#42198 [Opn->Fbk]: SCRIPT_NAME and PHP_SELF truncated when inside a userdir and using PATH_INFO

From: Date: Sat, 04 Aug 2007 14:13:37 +0000
Subject: #42198 [Opn->Fbk]: SCRIPT_NAME and PHP_SELF truncated when inside a userdir and using PATH_INFO
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-115749@lists.php.net to get a copy of this message
 ID:               42198
 Updated by:       jani@php.net
 Reported By:      hans at parse dot nl
-Status:           Open
+Status:           Feedback
 Bug Type:         CGI related
 Operating System: Linux
 PHP Version:      5.2.4RC1
 New Comment:

And you are really using 5.2.4RC1? 


Previous Comments:
------------------------------------------------------------------------

[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


Thread (15 messages)

« previous php.bugs (#115749) next »