php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68822 php-fpm - the result of access log is wrong when use fastcgi_finish_request
Submitted: 2015-01-13 04:34 UTC Modified: 2015-02-01 08:20 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: redfoxli069 at gmail dot com Assigned: fat (profile)
Status: Closed Package: FPM related
PHP Version: 5.5.20 OS: linux
Private report: No CVE-ID: None
 [2015-01-13 04:34 UTC] redfoxli069 at gmail dot com
Description:
------------
the result of access log is wrong when use fpm_request_finished,such as 
1)%t: server time the request was received
2)%d: time taken to serve the request

access formate is here:
access.format = "%R - %u %t %T %s %{mili}d %{kilo}M %C%%"

Test script:
---------------
<?php
    echo "hi\n";
    fastcgi_finish_request();

Expected result:
----------------
127.0.0.1 -  13/Jan/2015:12:30:07 +0800 13/Jan/2015:12:30:07 +0800 200 0.913 256 0.00%

Actual result:
--------------
127.0.0.1 -  01/Jan/1970:08:00:00 +0800 13/Jan/2015:12:30:07 +0800 200 3896627338.811 256 0.00%

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-13 04:43 UTC] redfoxli069 at gmail dot com
-Summary: php-fpm - the result of access log is wrong when use fpm_request_finished +Summary: php-fpm - the result of access log is wrong when use fastcgi_finish_request
 [2015-01-13 04:43 UTC] redfoxli069 at gmail dot com
Description:
------------
the result of access log is wrong when use fastcgi_finish_request,such as 
1)%t: server time the request was received
2)%d: time taken to serve the request

access formate is here:
access.format = "%R - %u %t %T %s %{mili}d %{kilo}M %C%%"

Test script:
---------------
<?php
    echo "hi\n";
    fastcgi_finish_request();

Expected result:
----------------
127.0.0.1 -  13/Jan/2015:12:30:07 +0800 13/Jan/2015:12:30:07 +0800 200 0.913 256 0.00%

Actual result:
--------------
127.0.0.1 -  01/Jan/1970:08:00:00 +0800 13/Jan/2015:12:30:07 +0800 200 3896627338.811 256 0.00%
 [2015-02-01 08:20 UTC] stas@php.net
-Assigned To: +Assigned To: fat
 [2015-02-16 12:23 UTC] tony2001@php.net
Automatic comment on behalf of honghu069@163.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3664345abac75aabedfbca061b0b7db5915de085
Log: fix bug #68822 (request time is reset too early)
 [2015-02-16 12:23 UTC] tony2001@php.net
-Status: Assigned +Status: Closed
 [2015-02-16 12:23 UTC] tony2001@php.net
Automatic comment on behalf of honghu069@163.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3664345abac75aabedfbca061b0b7db5915de085
Log: fix bug #68822 (request time is reset too early)
 [2015-02-16 12:28 UTC] tony2001@php.net
Automatic comment on behalf of honghu069@163.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3664345abac75aabedfbca061b0b7db5915de085
Log: fix bug #68822 (request time is reset too early)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC