Bug #72308 [Opn->Asn]: fastcgi_finish_request and logging environment variables
Edit report at https://bugs.php.net/bug.php?id=72308&edit=1
ID: 72308
Updated by: tony2001@php.net
Reported by: max at bitrix dot ru
Summary: fastcgi_finish_request and logging environment
variables
-Status: Open
+Status: Assigned
Type: Bug
Package: FPM related
Operating System: Ubuntu 14.04
PHP Version: 7.0.7
-Assigned To:
+Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
Xinchen, could you take a look?
Previous Comments:
------------------------------------------------------------------------
[2016-06-01 09:07:18] max at bitrix dot ru
This is because of fix of bug
https://bugs.php.net/bug.php?id=70279
------------------------------------------------------------------------
[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)