#48695 [Opn]: PHP_SELF / SCRIPT_NAME issues not bogus - bugfix in 5.2.9 still causing trouble
| From: | allerlei+bugs dot php dot net at sihw dot nl | Date: | Thu, 25 Jun 2009 14:24:43 +0000 |
| Subject: | #48695 [Opn]: PHP_SELF / SCRIPT_NAME issues not bogus - bugfix in 5.2.9 still causing trouble | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-138823@lists.php.net to get a copy of this message | ||
ID: 48695
User updated by: allerlei+bugs dot php dot net at sihw dot nl
Reported By: allerlei+bugs dot php dot net at sihw dot nl
Status: Open
Bug Type: CGI related
Operating System: Centos 4/5
PHP Version: 5.2.10
New Comment:
Bug #47625 was closed as bogus (because it would be the same as bug
#47042) but it is not. In version 5.2.10 at least, PHP_SELF and
SCRIPT_FILENAME are set based on the ORIG_SCRIPTNAME, while in version
5.2.8 these are based on SCRIPT_NAME.
So bug #47042 fixes some bug, but introduces a new one. Therefore this
is not a duplicate bug. It is not bogus because the values of PHP_SELF
etc changed between 5.2.8 and 5.2.10 without this being part of the
specification
for 5.2.10. It breaks a lot of code on my systems, including
phpmyadmin
and joomla.
Problem is that PHP_SELF should refer to the URL before the internal
redirect or external handler. This is a problematic requirement
because
of all the jugling with SCRIPTNAME and ORIG_SCRIPTNAME, but bug #47625
described the bug exactly. The problem might me in the naming:
handlers
put the redirection into ORIG_SCRIPTNAME and the original path in
SCRIPTNAME.
I use a handler called startscript that is called with some pathinfo
like /../startscript/php/myuser/path/to/script/.
So the path
/centraal/scripts/info.php
when called from a vsite owned by user jelmer, is rewritten to
/usr/bin/startscript/php/jelmer/scripts/info.php
but PHP_SELF should remain /centraal/scripts/info.php
Thank you for your thougths,
Jelmer
Previous Comments:
------------------------------------------------------------------------
[2009-06-25 14:22:35] allerlei+bugs dot php dot net at sihw dot nl
Description:
------------
Bug #47625 was closed as bogus (because it would be the same as bug
#47042) but it is not. In version 5.2.10 at least, PHP_SELF and
SCRIPT_FILENAME are set based on the ORIG_SCRIPTNAME, while in version
5.2.8 these are based on SCRIPT_NAME.
So bug #47042 fixes some bug, but introduces a new one. Therefore this
is not a duplicate bug. It is not bogus because the values of PHP_SELF
etc changed betwoon 5.2.10 without this being part of the specification
for 5.2.10. It breaks a lot of code on my systems, including phpmyadmin
and joomla.
Problem is that PHP_SELF should refer to the URL before the internal
redirect or external handler. This is a problematic requirement because
of all the jugling with SCRIPTNAME and ORIG_SCRIPTNAME, but bug #47625
described the bug exactly. The problem might me in the naming: handlers
put the redirection into ORIG_SCRIPTNAME and the original path in
SCRIPTNAME.
I use a handler called startscript that is called with some pathinfo
like /../startscript/php/myuser/path/to/script/.
So the path
/centraal/scripts/info.php
when called from a vsite owned by user jelmer, is rewritten to
/usr/bin/startscript/php/jelmer/scripts/info.php
but PHP_SELF should remain /centraal/scripts/info.php
Thank you for your thougths,
Jelmer
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48695&edit=1