#38040 [Opn->Bgs]: php_self incorrect in cgi mode
ID: 38040
Updated by: sniper@php.net
Reported By: php at jon dot limedaley dot com
-Status: Open
+Status: Bogus
Bug Type: CGI related
Operating System: Debian Linux testing
PHP Version: 5.2.0
New Comment:
Read the php.ini-dist and search the cgi.* entries. This is not a bug.
Previous Comments:
------------------------------------------------------------------------
[2006-07-16 00:47:53] php at jon dot limedaley dot com
I have reverted to the debian install package since I haven't heard
anything. Should be pretty easy to reproduce. If you want any help
debugging it, you can let me know.
------------------------------------------------------------------------
[2006-07-09 00:17:37] php at jon dot limedaley dot com
Ok, I got the 5.2.0 snapshot as you requested.
It still seems broken to me if cgi.fix_pathinfo is turned on, which I
believe is the default, and necessary to make $_SERVER['PHP_SELF']
return the correct value.
Is it correct for PATH_INFO to be not defined, when ORIG_PATH_INFO was
correct?
Looking at the source, it seems that PATH_INFO is miscalculated because
PATH_TRANSLATED is incorrect? But, I am not at all sure what
PATH_TRANSLATED is supposed to be.
See here:
http://jon.limedaley.com/misc/test.php5/asd
What do you think
PHP_SELF
PATH_INFO
PATH_TRANSLATED
should be?
What if cgi.fix_pathinfo were not defined, then what should those
values be?
Maybe I am just not understanding how it is designed to work.
------------------------------------------------------------------------
[2006-07-08 20:47:48] tony2001@php.net
>now seems that php5 is alright
Then please change the version in the report and try 4.4.x snapshot
from http://snaps.php.net instead of some third-party build.
------------------------------------------------------------------------
[2006-07-08 20:35:19] php at jon dot limedaley dot com
var_dumps can be found here:
http://jon.limedaley.com/misc/test.php
http://jon.limedaley.com/misc/test.php5
http://jon.limedaley.com/misc/test.php/asd
http://jon.limedaley.com/misc/test.php5/asd
I have been working on seeing if there was a workaround for this, and
it now seems that php5 is alright, but php4 has the wrong data. I am
quite confused, as I looked at this a week or two ago and the behavior
was different. There was a debian upgrade to php4 recently, but I
didn't see anything interesting in the changelog.
cgi.fixpathinfo is not defined for php4 or php5, which I think defaults
to 0 for php4 and 1 for php5?
Does php_self and path_info look how you think it should for the four
URLs above?
I think they look alright for php5, but test.php/asd seems to have
php_self set incorrectly?
------------------------------------------------------------------------
[2006-07-08 20:09:29] tony2001@php.net
var_dump($_SERVER); ?
------------------------------------------------------------------------
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/38040
--
Edit this bug report at http://bugs.php.net/?id=38040&edit=1
Thread (9 messages)