note 128948 added to install.fpm
| From: | " at main dot php dot net | Date: | Fri, 13 Oct 2023 03:04:35 +0000 |
| Subject: | note 128948 added to install.fpm | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220907@lists.php.net to get a copy of this message | ||
in response to "ikrabbe dot ask at gmail dot com" about SCRIPT_NAME and PATH_INFO being
empty, this could be related...
while configuring php-fpm with nginx in debian (actually raspberry pi), a comment line in .conf
grabbed my attention
there is a "feature" (that looks more like a bug) reported about 10 years ago in http://trac.nginx.org/nginx/ticket/321 ... in
which "try_files" could reset the contents of $fastcgi_script_name and $fastcgi_path_info
... this is a workaround mentioned in forums by user "zakaria"
<?php /* not actual php code but nginx .conf */
location ~ [^/]\.php(/|$)
{
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
# Save the $fastcgi_path_info before try_files clear it
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
try_files $fastcgi_script_name =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
?>
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.157.134 (proxied: 207.248.219.88)
----
Manual Page -- https://php.net/manual/en/install.fpm.php
Edit -- https://main.php.net/note/edit/128948
Del: integrated -- https://main.php.net/note/delete/128948/integrated
Del: useless -- https://main.php.net/note/delete/128948/useless
Del: bad code -- https://main.php.net/note/delete/128948/bad+code
Del: spam -- https://main.php.net/note/delete/128948/spam
Del: non-english -- https://main.php.net/note/delete/128948/non-english
Del: in docs -- https://main.php.net/note/delete/128948/in+docs
Del: other reasons-- https://main.php.net/note/delete/128948
Reject -- https://main.php.net/note/reject/128948
Search -- https://main.php.net/manage/user-notes.php