From:             admin at 3dr dot org
Operating system: FreeBSD 9.1
PHP version:      5.3Git-2013-04-22 (Git)
Package:          FPM related
Bug Type:         Bug
Bug description:_SERVER["SCRIPT_NAME"] incorrectly evaluated

Description:
------------
I use mod_proxy_fcgi along with FPM:

ProxyPassMatch ^/(.*\.php(/.*)?)$ 
fcgi://172.16.0.11:1007/home/admin/domains/domenaadmina.fulo.inten.pl/public_htm
l/$1 timeout=180

Using scripts like this:
/glowna/index.php/aaa/bbb/ccc

causes _SERVER["SCRIPT_NAME"] to be wrongly evaluated. Instead of 
/glowna/index.php FPM returns 
/glowna/index.php/aaa/bbb/ccc which obviously also destroys
_SERVER["PHP_SELF"].

We've checked it with cgi.fix_pathinfo = 0 (no input file specified error)
and 
cgi.fix_pathinfo = 1.
proxy-fcgi-pathinfo = 1 doesn't help to.



Expected result:
----------------
_SERVER["REQUEST_URI"]  /glowna/index.php/aaa/bbb/ccc
_SERVER["SCRIPT_NAME"]  /glowna/index.php
_SERVER["PATH_INFO"]    /aaa/bbb/ccc
_SERVER["ORIG_SCRIPT_FILENAME"] 
/home/admin/domains/domenaadmina.fulo.inten.pl/public_html/glowna/index.php/aaa/bb
b/ccc
_SERVER["PATH_TRANSLATED"]      
/home/admin/domains/domenaadmina.fulo.inten.pl/public_html/aaa/bbb/ccc
_SERVER["PHP_SELF"]     /glowna/index.php/aaa/bbb/ccc

Actual result:
--------------
_SERVER["REQUEST_URI"]  /glowna/index.php/aaa/bbb/ccc
_SERVER["SCRIPT_NAME"]  /glowna/index.php/aaa/bbb/ccc
_SERVER["PATH_INFO"]    /aaa/bbb/ccc
_SERVER["ORIG_SCRIPT_FILENAME"] 
/home/admin/domains/domenaadmina.fulo.inten.pl/public_html/glowna/index.php/aaa/bb
b/ccc
_SERVER["PATH_TRANSLATED"]      
/home/admin/domains/domenaadmina.fulo.inten.pl/public_html/aaa/bbb/ccc
_SERVER["PHP_SELF"]     /glowna/index.php/aaa/bbb/ccc/aaa/bbb/ccc

-- 
Edit bug report at https://bugs.php.net/bug.php?id=64689&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64689&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64689&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=64689&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64689&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64689&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64689&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64689&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64689&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64689&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64689&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=64689&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=64689&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64689&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64689&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64689&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64689&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64689&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64689&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64689&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64689&r=mysqlcfg

Reply via email to