#39077 [Opn->Bgs]: PATH_INFO not available in PHP 5.2 win32
| From: | pcdinh at gmail dot com | Date: | Sat, 07 Oct 2006 14:22:44 +0000 |
| Subject: | #39077 [Opn->Bgs]: PATH_INFO not available in PHP 5.2 win32 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-103237@lists.php.net to get a copy of this message | ||
ID: 39077
User updated by: pcdinh at gmail dot com
Reported By: pcdinh at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Apache2 related
Operating System: Windows XP
PHP Version: 5.2.0RC5
New Comment:
Sorry I have made a mistake. Just ignore it.
Previous Comments:
------------------------------------------------------------------------
[2006-10-07 14:15:33] pcdinh at gmail dot com
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 this bug report at http://bugs.php.net/?id=39077&edit=1