Bug #72308 [NEW]: fastcgi_finish_request and logging environment variables
From: max at bitrix dot ru
Operating system: Ubuntu 14.04
PHP version: 7.0.7
Package: FPM related
Bug Type: Bug
Bug description:fastcgi_finish_request and logging environment variables
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 bug report at https://bugs.php.net/bug.php?id=72308&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72308&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72308&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72308&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72308&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72308&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72308&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72308&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72308&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72308&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72308&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72308&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72308&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72308&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72308&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72308&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72308&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72308&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72308&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72308&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72308&r=mysqlcfg
Thread (6 messages)
- max at bitrix dot ru