Bug #72319 [Com]: FPM status page shows wrong request_uri
| From: | a dot rzadkowolski at gmail dot com | Date: | Tue, 13 Apr 2021 21:15:17 +0000 |
| Subject: | Bug #72319 [Com]: FPM status page shows wrong request_uri | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-233411@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72319&edit=1
ID: 72319
Comment by: a dot rzadkowolski at gmail dot com
Reported by: zzromanzz at gmail dot com
Summary: FPM status page shows wrong request_uri
Status: Open
Type: Bug
Package: FPM related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Also got into this issue today. Also happens with slow log.
This is due how fpm_main.c replaces request_uri with SCRIPT_NAME.
Any idea how nginx/fpm users can work around it?
It happens with basically such setup (notice internal part).
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
fastcgi_pass php74;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
internal;
}
And if you look at status page you will notice that example.com https://example.com/login
renders as:
request URI: /index.php
Even though in php I can see proper REQUEST_URI variable inside $_SERVER vars.
Previous Comments:
------------------------------------------------------------------------
[2016-12-05 07:12:24] zzromanzz at gmail dot com
Ping :)
------------------------------------------------------------------------
[2016-06-02 20:00:13] zzromanzz at gmail dot com
Description:
------------
PHP FPM status page (FPM config: pm.status_path = /status) in full mode (/status&full) shows
'request uri' from SCRIPT_NAME CGI variable.
This column should report proper value e.g. from REQUEST_URI CGI variable.
There is no way I can determine real uri 'request uri' value when all requests are handled
by index.php file and SCRIPT_NAME variable is set to value 'index.php' (I believe this is
correct approach)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72319&edit=1