#39077 [NEW]: PATH_INFO not available in PHP 5.2 win32
| From: | pcdinh at gmail dot com | Date: | Sat, 07 Oct 2006 14:15:33 +0000 |
| Subject: | #39077 [NEW]: PATH_INFO not available in PHP 5.2 win32 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-103236@lists.php.net to get a copy of this message | ||
From: pcdinh at gmail dot com
Operating system: Windows XP
PHP version: 5.2.0RC5
PHP Bug Type: Apache2 related
Bug description: PATH_INFO not available in PHP 5.2 win32
Description:
------------
I would like to user $_SERVER['PATH_INFO'] in one of my search-engine
friendly script but unfortunately, it is not available under Apache 2.2,
PHP 5.2 RC5 installed as a module. PHP engine said: Undefined index:
PATH_INFO
Reproduce code:
---------------
Sample code
index.php in mod_rewrite folder
<a href="http://localhost/mod_rewrite/forum/21/3.html">url</a>
<?php
var_dump($_SERVER['PATH_INFO']);
?>
.htaccess in mod_rewrite folder
AcceptPathInfo On
RewriteEngine On
Options +FollowSymLinks
RewriteRule ^index.php(/.*) /index.php [E=PATH_INFO:$1,L]
RewriteRule ^(.*)/(.*)/(.*).html
http://localhost/mod_rewrite/index.php?module=$1&cid=$2&topic=$3
=============================================
My environment
=========My PHP directives in httpd.conf of Apache 2.2.3
LoadModule php5_module "c:/server/php5/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "c:/server/php5"
<Directory "D:/webroot">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI
MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please
see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess
files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
AcceptPathInfo On
</Directory>
=================My PHP.ini
extension=php_mbstring.dll
;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_apc.dll
;extension=php_memcache.dll
;extension=php_http.dll
extension=php_pdo.dll
extension=php_pdo_mysql.dll
;zend_extension_ts = "C:/server/php5/ext/php_xdebug.dll"
Expected result:
----------------
I expected that when I click on the link
http://localhost/mod_rewrite/forum/21/3.html
the value of PATH_INFO will
be printed out from http://localhost/mod_rewrite/index.php because
.htaccess should be routed the request to index.php.
Actual result:
--------------
The script has printed out:
Notice: Undefined index: PATH_INFO in D:\webroot\mod_rewrite\index.php on
line 3
NULL
--
Edit bug report at http://bugs.php.net/?id=39077&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39077&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39077&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39077&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39077&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39077&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39077&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39077&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39077&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39077&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39077&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39077&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39077&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39077&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39077&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39077&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39077&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39077&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39077&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39077&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39077&r=mysqlcfg