Req #81670 [Com]: Access log contains wrong values for "%r" (request URI) format string

From: Date: Wed, 03 May 2023 02:32:29 +0000
Subject: Req #81670 [Com]: Access log contains wrong values for "%r" (request URI) format string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-244355@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81670&edit=1

 ID:                 81670
 Comment by:         geoff12aas at aol dot com
 Reported by:        amenshchikov at gmail dot com
 Summary:            Access log contains wrong values for "%r" (request
                     URI) format string
 Status:             Assigned
 Type:               Feature/Change Request
 Package:            FPM related
 Operating System:   Debian 11
 PHP Version:        8.1.0
 Assigned To:        bukka
 Block user comment: N
 Private report:     N

 New Comment:

(https://www.cameo.com/jeremypiven)github.com
(https://www.facebook.com/jeremypivenpage/)github.com
(https://www.amazon.com/prime-video/actor/Jeremy-Piven/amzn1.dv.gti.785e61d6-1dd8-4777-88c4-b33c24097594)github.com
(https://pixarcars.fandom.com/wiki/Jeremy_Piven)github.com
(https://www.eonline.com/news/1371236/jeremy-piven-teases-his-idea-for-entourage-reboot)github.com
(https://www.rottentomatoes.com/celebrity/jeremy_piven)github.com
(https://twitter.com/jeremypiven)github.com
(https://www.emmys.com/bios/jeremy-piven)github.com
(https://www.blu-ray.com/Jeremy-Piven/70580/)github.com
(https://ramentertainment.com/jeremy-piven)github.com
(https://podcasts.apple.com/us/podcast/the-big-shark-jeremy-piven/id1558354780?i=1000608694599)github.com
(https://www.etonline.com/people/jeremy-piven)github.com
(https://www.ibdb.com/broadway-cast-staff/jeremy-piven-405986)github.com
(https://abcnews.go.com/GMA/Culture/video/jeremy-piven-talks-new-movie-sweetwater-98145023)github.com
(https://www.eonline.com/news/1371236/jeremy-piven-teases-his-idea-for-entourage-reboot)github.com
(https://www.youtube.com/watch?v=RtQRmT2cSAM)github.com
(https://www.instagram.com/jeremypiven/)github.com
(https://www.imdb.com/name/nm0005315/)github.com
(https://www.tvguide.com/celebrities/jeremy-piven/credits/3000397119/)github.com
(https://www.tcm.com/tcmdb/person/153053%7C174725/Jeremy-Piven#overview)github.com
(https://www.bravotv.com/watch-what-happens-live-with-andy-cohen/season-12/episode-96/videos/jeremy-pivens-mercury-poisoning)github.com
(https://www.tvinsider.com/people/jeremy-piven/)github.com
(https://en.wikipedia.org/wiki/Jeremy_Piven)github.com
(https://www.primetimer.com/item/Jeremy-Piven-to-host-celebrity-interview-podcast-How-U-Livin-J-Piven-WoSpdw)github.com
(https://www.imdb.com/name/nm0005315/news)github.com
(https://en.wikipedia.org/wiki/Jeremy_Piven)github.com
(https://www.the-sun.com/entertainment/tv/3810895/jeremy-piven-reveals-entourage-return-woke-twist-ari-gold/)github.com
(https://en.wikipedia.org/wiki/Jeremy_Piven)github.com
(https://www.imdb.com/title/tt3661590/)github.com


Previous Comments:
------------------------------------------------------------------------
[2022-12-12 04:58:37] CourtneySykes at rhyta dot com

You can use the built-in log () function to compute the log of a value in R. Pass the value for
which you want to compute the log as an argument. The following is the syntax – x – The
value for which you want to compute the log. base (optional) – The logarithmic base to use.

<https://www.mcdvoice.guru/>github.com

------------------------------------------------------------------------
[2022-11-23 04:51:34] ami262 at gmail dot com

if you're actually running into this limit, you are probably abusing GET to begin with. You
should use POST to transmit this sort of data -- especially since you even concede that you're
using it to update values. If you check the link above, you'll notice that Apache even says
"Under normal conditions, the value should not be changed from the default."

www.jcpenneykiosk.review

------------------------------------------------------------------------
[2021-12-01 06:58:45] amenshchikov at gmail dot com

Another one place where the same problem takes place — status page.
There "request URI" also shows the SCRIPT_NAME (with query string) instead of REQUEST_URI
(see https://bugs.php.net/bug.php?id=72319).

------------------------------------------------------------------------
[2021-11-29 22:17:02] amenshchikov at gmail dot com

"%{PATH_INFO}e" produces empty string, "%{ORIG_PATH_INFO}e" produces
"-".

I have the following nginx configuration:

server {
    ...
    location / {
        try_files $uri /index.php$is_args$args;
    }

    location ~ ^/index\.php(/|$) {
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;

        include fastcgi.conf;
        internal;
    }
    ...
}

------------------------------------------------------------------------
[2021-11-29 20:53:39] bukka@php.net

What I meant that we should update documentation to state that "%r" is for SCRIPT_NAME
rather than for REQUEST_URI fcgi env. We cannot just change the value as it could potentially break
some scripts that already depend on it being a SCRIPT_NAME. The thing is that internally script name
is taken as request uri so I don't think REQUEST_URI is used for anything but might have missed
something.

In your case it doesn't really matter that much because if we just changed it to REQUEST_URI
than it would contain a query so I guess it wouldn't help you. I guess specific flag for path
info might help as it might not be always reliable to get it from env (at least the logic around
that doesn't seem that straight forward as there are some hacks around Apache). You might
actually give it a try and see if "%{PATH_INFO}e" or "%{ORIG_PATH_INFO}e" works
for you?

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=81670


--
Edit this bug report at https://bugs.php.net/bug.php?id=81670&edit=1


Thread (10 messages)

« previous php.bugs (#244355) next »