Edit report at https://bugs.php.net/bug.php?id=64689&edit=1
ID: 64689 User updated by: admin at 3dr dot org Reported by: admin at 3dr dot org Summary: _SERVER["SCRIPT_NAME"] incorrectly evaluated Status: Not a bug Type: Bug Package: FPM related Operating System: FreeBSD 9.1 PHP Version: 5.3Git-2013-04-22 (Git) Block user comment: N Private report: N New Comment: @johan...@php.net Well - this is not true - FPM is evaluating most of _SERVER variables. Just have a look at fpm_main.c at line 1198 - that's the place where SCRIPT_NAME is beeing evaluated. When you try to send [E=SCRIPT_NAME:whatever] from Apache side - it's beeing immidiatelly overwritten by FPM. Go check by yourself. Luke Previous Comments: ------------------------------------------------------------------------ [2013-04-22 08:55:47] johan...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php $_SERVER variables are passed by the server, PHP doesn't touch it. ------------------------------------------------------------------------ [2013-04-22 08:40:42] admin at 3dr dot org 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 this bug report at https://bugs.php.net/bug.php?id=64689&edit=1