I'm using Debian 9 with PHP-FPM 7.0.26-2
& 5.6.32-1
from repository deb.sury.org. The same configuration is working fine on a Debian 8 server with PHP-FPM 5.6.30
- I've copied the
pool.d/user.conf
from that server. - Both
php.ini
files are havingcgi.fix_pathinfo=1
. - The parameter is also forced using
php_admin_value[cgi.fix_pathinfo] = 1
. Both servers uses this pool similarly from
<VirtualHost>
context with:ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/run/php/user.sock|fcgi://localhost/home/user/public_html
Now, there's an AJAX page that needs to read path from PATH_INFO
(possibly PATH_TRANSLATED
). However, while these variables have correct content on the Debian 8 server:
["SCRIPT_NAME"]=>
string(14) "/path/ajax.php"
["ORIG_SCRIPT_NAME"]=>
string(25) "/path/ajax.php/para/meters"
["PATH_INFO"]=>
string(12) "/para/meters"
["PATH_TRANSLATED"]=>
string(34) "/home/user/public_html/para/meters"
They seem to work differently on the fresh Debian 9 + dub.sury.org:
["SCRIPT_NAME"]=>
string(25) "/path/ajax.php/para/meters"
["PATH_TRANSLATED"]=>
string(22) "/home/user/public_html"
And the prameters ORIG_SCRIPT_NAME
and PATH_INFO
are completely missing.
It was the way I used the proxy_fcgi. As explained in the examples for
mod_proxy_fcgi
:So I replaced my
with a Handler & Worker:
Now all the AJAX request are working fine.
BONUS: If some knows why the
ProxyPassMatch
was able to calculate the thePATH_INFO
before on my Debian 8 / Apache 2.4.10 / PHP-FPM 5.6.30 but not with Debian 9, that would be awesome.As it is decribed on:
https://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.html#env
The reason, why the ProxyPassMatch does not set the PATH_INFO is the following: