#21716 [Com]: 4.3.0 don't pass PATH_INFO env.variable to script (php in CGI mode)

From: Date: Thu, 24 Apr 2003 01:39:16 +0000
Subject: #21716 [Com]: 4.3.0 don't pass PATH_INFO env.variable to script (php in CGI mode)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38244@lists.php.net to get a copy of this message
ID: 21716 Comment by: mloftis at modwest dot com Reported By: andrey at cherezov dot koenig dot su Status: Closed Bug Type: *Web Server problem Operating System: Win32 PHP Version: 4.3.0 Assigned To: shane New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2003-01-20 18:53:22] andrey at cherezov dot koenig dot su Thank you, Milky! This helps! ------------------------------------------------------------------------ [2003-01-20 18:13:41] 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-18 07:02:09] 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-18 06:40:07] 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-17 19:53:58] sniper@php.net See bug: http://bugs.php.net/bug.php?id=21575 And next time, SEARCH the bug database FIRST. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/21716 -- Edit this bug report at http://bugs.php.net/?id=21716&edit=1

« previous php.bugs (#38244) next »