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

Reply via email to