Bug #72308 [Asn->Csd]: fastcgi_finish_request and logging environment variables
Edit report at https://bugs.php.net/bug.php?id=72308&edit=1
ID: 72308
Updated by: laruence@php.net
Reported by: max at bitrix dot ru
Summary: fastcgi_finish_request and logging environment
variables
-Status: Assigned
+Status: Closed
Type: Bug
Package: FPM related
Operating System: Ubuntu 14.04
PHP Version: 7.0.7
Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=31ce3a661a04ec8addd8b0ede4af2d336646d0ec
Log: Fixed bug #72308 (fastcgi_finish_request and logging environment variables)
Previous Comments:
------------------------------------------------------------------------
[2016-06-01 14:46:43] tony2001@php.net
Xinchen, could you take a look?
------------------------------------------------------------------------
[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)