From:             allerlei+bugs dot php dot net at sihw dot nl
Operating system: Centos 4/5
PHP version:      5.2.10
PHP Bug Type:     CGI related
Bug description:  PHP_SELF / SCRIPT_NAME issues not bogus - bugfix in 5.2.9 
still causing trouble

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 bug report at http://bugs.php.net/?id=48695&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=48695&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=48695&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=48695&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=48695&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48695&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48695&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48695&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48695&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48695&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48695&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48695&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48695&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48695&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48695&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48695&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48695&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48695&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48695&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48695&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48695&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48695&r=mysqlcfg

Reply via email to