Bug #72308 [Com]: fastcgi_finish_request and logging environment variables
Edit report at https://bugs.php.net/bug.php?id=72308&edit=1
ID: 72308
Comment by: max at bitrix dot ru
Reported by: max at bitrix dot ru
Summary: fastcgi_finish_request and logging environment
variables
Status: Open
Type: Bug
Package: FPM related
Operating System: Ubuntu 14.04
PHP Version: 7.0.7
Block user comment: N
Private report: N
New Comment:
This is because of fix of bug
https://bugs.php.net/bug.php?id=70279
Previous Comments:
------------------------------------------------------------------------
[2016-06-01 08:37:56] max at bitrix dot ru
Description:
------------
In php-fpm.conf we have:
access.format = "%{REMOTE_ADDR}e # %{HTTP_HOST}e # %{HTTP_USER_AGENT}e pid=%pid # %t # %m # %r
# %Q%q # %s # %f # %{mili}d # %{kilo}M # %{user}C # %{system}C # "
If we make hit without fastcgi_finish_request() we get all %{...}e positions with right information.
If fastcgi_finish_request() call is there, then we get nothing.
This is because of change in sapi/fpm/fpm/fpm_main.c in function
PHP_FUNCTION(fastcgi_finish_request)
There was fcgi_close call with third paramters set to "0".
Now there is "1".
So when it comes to write into the log an environment variable, the hash is already destroyed.
Test script:
---------------
<?php
if (isset($_GET["no_fastcgi_finish_request"]))
echo "no_fastcgi_finish_request";
else
fastcgi_finish_request();
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72308&edit=1
Thread (6 messages)