From: hans at parse dot nl Operating system: Linux PHP version: 5.2.4RC1 PHP Bug Type: CGI related Bug description: SCRIPT_NAME and PHP_SELF truncated when inside a userdir and using PATH_INFO
Description: ------------ Problem is as described in Lighttpd ticket #405 at http://trac.lighttpd.net/trac/ticket/405 Using Lighttpd with PHP-5.2.4RC1 as FastCGI. cgi.fix_pathinfo = 1 in php.ini Accessing a script in a userdir without path info works fine: http://servername/~hans/info.php SCRIPT_FILENAME = '/home/hans/public_html/info.php' SCRIPT_NAME = '/~hans/info.php' PHP_SELF = '/~hans/info.php' Accessing the same script with some added path info: http://servername/~hans/info.php/foo/bar PATH_INFO = '/foo/bar' SCRIPT_FILENAME = '/home/hans/public_html/info.php' SCRIPT_NAME = 'ic_html/info.php' PHP_SELF = 'ic_html/info.php' I have posted a working patch which adds a userdir check in cgi_main.c in the Lighttpd ticket mentioned. -- Edit bug report at http://bugs.php.net/?id=42198&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42198&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42198&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42198&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42198&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42198&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42198&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42198&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42198&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42198&r=support Expected behavior: http://bugs.php.net/fix.php?id=42198&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42198&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42198&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42198&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42198&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42198&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42198&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42198&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42198&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42198&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42198&r=mysqlcfg