#48695 [Com]: PHP_SELF / SCRIPT_NAME issues not bogus - bugfix in 5.2.9 still causing trouble

[email protected] ("sriram dot natarajan at gmail dot com")
Newsgroups php.bugs
Message-ID <[email protected]>
 ID:               48695
 Comment by:       sriram dot natarajan at gmail dot com
 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:

have you tried this issue with recent php 5.2.10 . r u able to
reproduce 
this with 5.2.10 as well ?


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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.