php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21716 4.3.0 don't pass PATH_INFO env.variable to script (php in CGI mode)
Submitted: 2003-01-17 17:19 UTC Modified: 2003-01-20 18:53 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: andrey at cherezov dot koenig dot su Assigned: shane (profile)
Status: Closed Package: *Web Server problem
PHP Version: 4.3.0 OS: Win32
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andrey at cherezov dot koenig dot su
New email:
PHP Version: OS:

 

 [2003-01-17 17:19 UTC] andrey at cherezov dot koenig dot su
4.3.0 don't pass PATH_INFO env.variable to script (php in CGI mode under Windows 2000). 4.2.3, 4.2.2 and all previous work with PATH_INFO without problems.

Also 4.3.0 changes SCRIPT_NAME so script receives not the same string as passed by WebServer! Also 4.2.x not have this problem.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-17 19:53 UTC] sniper@php.net
See bug: http://bugs.php.net/bug.php?id=21575

And next time, SEARCH the bug database FIRST.

 [2003-01-18 06:40 UTC] andrey at cherezov dot koenig dot su
That topic not solved this bug!! PHP 4.3.0 in CGI mode (php.exe) under Win32 NEVER shows PATH_INFO to script. Even if web-server have passed it according CGI-specs, like http://host/script.php/path/info. Just try - you'll unable to get PATH_INFO from 4.3.0.

shane@caraveo.com wrote:
>For 4.3, cgi variables were changed to correctly conform to 
>cgi specs.  This means that
>PATH_INFO is now in fact PATH_INFO as per:
>http://hostname/script_name.php/path/info?query_string

You may try this URL url on Win32 web-server with PHP 4.3.0 as CGI and YOU WILL SEE - for this URL PHP will not show PATH_INFO variable, passed to it by web-server! Web-server pass PATH_INFO=/path/info (for this URL), but PhpInfo() in PHP 4.3.0 will NOT show PATH_INFO in the list! All old 4.2.x versions works OK with this case, and previous 4.3.0-dev too, but in 4.3.0 just drop PATH_INFO in any case. This is definitely 4.3.0 BUG.
 [2003-01-18 07:02 UTC] andrey at cherezov dot koenig dot su
Compare these PhpInfo() outputs:

http://php430.eserv.ru/php_info.php/path/info?query
http://php423.eserv.ru/php_info.php/path/info?query

Same web-server, same php.ini, very different environment variables! (of course, web-server pass the same variables, but 4.3.0 damages them! ;) PATH_INFO disappears in 4.3.0 :(
 [2003-01-20 18:13 UTC] phpnet dot 5 dot mario17 at spamgourmet dot org (milky)
Someone introduced a "workaround" for webservers (Apache)
which hand over a wrong PATH_INFO. This behaviour however
hurts all others then (Nanoweb).

cgi.fix_pathinfo=0

in the php.ini seems to fix it
don't know if it helps with the other CGI variables
 [2003-01-20 18:53 UTC] andrey at cherezov dot koenig dot su
Thank you, Milky! This helps!
 [2003-04-23 20:39 UTC] mloftis at modwest dot com
This is even worse in 4.3.1, the whole thing Internal Server Errors -- PHP exits with an error code of 255 after attempting to OPEN (according to strace) whatever you gave it in the pathinfo.  When a file is created it opens and runs that file instead of the CGI script.
 [2003-05-13 06:21 UTC] chedong at hotmail dot com
http://php430.eserv.ru/php_info.php/path/info?query
http://php423.eserv.ru/php_info.php/path/info?query
runs acWeb 3.0 not IIS

I tried it with IIS 5.0 but still failed with
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 05:01:31 2024 UTC