1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 11:42:17 +02:00
Files
archived-php-src/sapi
Remi Collet 8cac75969e Fixed bug #65641 PHP-FPM incorrectly defines the SCRIPT_NAME variable when using Apache
ProxyPass is unable to provide correct PATH_INFO
as it is not aware of file path (while SetHandler is).

As we can extract PATH_INFO from PATH_TRANSLATED,
we also need to check if present in SCRIPT_NAME
and remove it.

After applying this patch.
With mod_php
_SERVER["REQUEST_URI"]     /info.php/foo/bar?q=1
_SERVER["SCRIPT_NAME"]     /info.php
_SERVER["PATH_INFO"]       /foor/bar
_SERVER["PHP_SELF"]        /info.php/foo/bar
_SERVER["QUERY_STRING"]    q=1

With mod_proxy_fcgi + SetHandler
_SERVER["REQUEST_URI"]     /info.php/foo/bar?q=1
_SERVER["SCRIPT_NAME"]     /info.php
_SERVER["PATH_INFO"]       /foo/bar
_SERVER["PHP_SELF"]        /info.php/foo/bar
_SERVER["QUERY_STRING"]    q=1

With mod_proxy_fcgi + ProxyPass
_SERVER["REQUEST_URI"]     /info.php/foo/bar?q=1
_SERVER["SCRIPT_NAME"]     /info.php
_SERVER["PATH_INFO"]       /foo/bar
_SERVER["PHP_SELF"]        /info.php/foo/bar
_SERVER["QUERY_STRING"]    q=1
2014-09-15 13:29:55 +02:00
..
2014-01-03 11:06:16 +08:00
2014-01-03 11:06:16 +08:00
2014-01-03 11:06:16 +08:00
2014-01-03 11:06:16 +08:00
2014-01-03 11:06:16 +08:00
2014-01-03 11:06:16 +08:00
2014-03-24 10:28:48 +01:00
2014-01-03 11:06:16 +08:00
2014-01-03 11:06:16 +08:00
2014-01-03 11:06:16 +08:00
2014-01-03 11:06:16 +08:00
2014-01-03 11:06:16 +08:00
2014-01-03 11:06:16 +08:00
2014-01-03 11:06:16 +08:00
2014-01-03 11:06:16 +08:00