SCRIPT_NAME and PHP_SELF truncated when inside a userdir and using PATH_INFO
| Bug #42198 | SCRIPT_NAME and PHP_SELF truncated when inside a userdir and using PATH_INFO | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2007-08-03 10:24 UTC | Modified: | 2007-08-08 13:03 UTC |
|
||||||
| From: | hans at parse dot nl | Assigned: | dmitry (profile) | |||||||
| Status: | Closed | Package: | CGI/CLI related | |||||||
| PHP Version: | 5.2.4RC1 | OS: | Linux | |||||||
| Private report: | No | CVE-ID: | None | |||||||
[2007-08-03 10:24 UTC] hans at parse dot nl
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.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2007-08-04 14:13 UTC] jani@php.net
[2007-08-04 14:14 UTC] jani@php.net
[2007-08-06 08:30 UTC] hans at parse dot nl
[2007-08-06 15:45 UTC] jani@php.net
[2007-08-06 16:11 UTC] hans at parse dot nl
[2007-08-07 09:23 UTC] hans at parse dot nl
[2007-08-07 11:41 UTC] jani@php.net
[2007-08-07 11:51 UTC] jani@php.net
[2007-08-07 12:35 UTC] hans at parse dot nl
[2007-08-07 13:08 UTC] jani@php.net
[2007-08-07 14:56 UTC] hans at parse dot nl
[2007-08-07 15:43 UTC] jani@php.net
[2007-08-08 13:03 UTC] dmitry@php.net