Bug #811
closedPATH_INFO, ORIG_PATH_INFO, and PHP_SELF not set in Lighttpd1.4.11/PHP4.4.3
Description
In the course of playing with my new Lighty
server running on Debian, I ran into a problem with the PHP_SELF, PATH_INFO, and
ORIG_PATH_INFO variables - specifically, Lighty doesn't provide them to
my PHP install.
Even after applying all the fixes I could find:
Adding "broken-scriptfilename" => "enable" to my PHP config in
lighttpd.conf
Set cgi.fix_pathinfo = 1 in /etc/php4/cgi/php.ini
Compiled PHP4 with ./configure --enable-fastcgi --enable-ftp
--with-mysql --enable-force-redirect --enable-discard-path
Various combinations of these fixes didn't work either (PHP compiled with and without each/both of the cgi-related switches). I found a workaround for the KnowledgeTree DMS: http://issues.ktdms.com/browse/KTS-1289 and a Google Answers post I made generated some good kludges(though neither of them work): http://google.com/answers/threadview?id=754764
This seems to be a fairly serious Lighty/PHP issue that affects a large number of people and currently has no resolution. If anyone wants any further information or wants to contribute ideas on how to fix this, feel free to e-mail me.
-- fietka
Updated by Anonymous about 18 years ago
I'm using lighttpd-1.4.13
and PHP5
PHP 5.2.1 (cgi-fcgi) (built: Mar 14 2007 18:18:17) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies with XCache v1.2.0, Copyright (c) 2005-2006, by mOo
I can't see any effect for cgi.fix_pathinfo = On or Off and fcgi conf is
fastcgi.server = ( ".php" => (( "bin-path" => "/usr/local/bin/php -c /my/php.ini", "socket" => "/tmp/php.socket", "bin-environment" => ("PHP_FCGI_CHILDREN" => "16", "PHP_FCGI_MAX_REQUESTS" => "10000"))))
PHP_SELF works fine all the way, PATH_INFO is not working but __FILE__ does the job!
-- masryalex
Updated by Anonymous over 17 years ago
This is more of a PHP bug and is fixed in PHP 5.2.4.
NOTE: It will never get fixed in PHP 4 so this is another reason to upgrade to PHP 5.
--Jani
p.s. IMO, this lighttpd ticket can be closed.
-- jani
Updated by stbuehler about 17 years ago
- Status changed from New to Fixed
- Resolution set to invalid
Also available in: Atom