ID: 42198
User updated by: hans at parse dot nl
Reported By: hans at parse dot nl
-Status: Feedback
+Status: Open
Bug Type: CGI related
Operating System: Linux
PHP Version: 5.2.4RC1
New Comment:
./configure --enable-cgi --enable-fastcgi --enable-force-cgi-redirect
--prefix=/usr --sysconfdir=/etc --with-config-file-path=/etc/php
--with-openssl --with-bz2 --with-gd --with-mysql --with-mysqli
--with-gettext --with-zlib --enable-mbstring --enable-sockets
--enable-sysvsem --enable-sysvshm --enable-debug=no
Direct link to my patch against php-5.2.3 on lighttpd Trac:
http://trac.lighttpd.net/trac/attachment/ticket/405/cgi_main.diff
Previous Comments:
------------------------------------------------------------------------
[2007-08-06 15:45:15] jani@php.net
What was the configure line used to configure PHP?
------------------------------------------------------------------------
[2007-08-06 08:30:01] hans at parse dot nl
Yes, problem found initially in 5.2.3 but i tested and confirmed with
5.2.4RC1 before submitting this bug report.
Turning off cgi.fix_pathinfo results in a "No input file specified."
message (url being http://servername/~hans/info.php/foo/bar).
------------------------------------------------------------------------
[2007-08-04 14:14:24] jani@php.net
Also, what is the result if cgi.fix_pathinfo = 0 ?
------------------------------------------------------------------------
[2007-08-04 14:13:36] jani@php.net
And you are really using 5.2.4RC1?
------------------------------------------------------------------------
[2007-08-03 10:24:23] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42198&edit=1