Bug #80628 [Opn->Csd]: error_log not working after fastcgi_finish_request
| From: | cmb@php.net | Date: | Fri, 15 Jan 2021 10:41:27 +0000 |
| Subject: | Bug #80628 [Opn->Csd]: error_log not working after fastcgi_finish_request | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-231574@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80628&edit=1
ID: 80628
Updated by: cmb@php.net
Reported by: vicreal at yandex dot ru
Summary: error_log not working after fastcgi_finish_request
-Status: Open
+Status: Closed
Type: Bug
Package: *General Issues
Operating System: Debian 10 x64 (4.19.132-1)
PHP Version: 8.0.1
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
> This is not a bug.
Okay, I'm closing this ticket then.
Previous Comments:
------------------------------------------------------------------------
[2021-01-14 22:38:16] vicreal at yandex dot ru
This is not a bug. In my case:
1) php.ini option "error_log" was not set => php-workers logged in stderr
2) PHP-FPM option "catch_workers_output" was set to "no"
3) nginx intercepted messages from stderr (from php-workers) and show them in self log
4) after execute php-function fastcgi_finish_request() nginx stopped intercepting messages from
stderr
To solve the problem, just run:
1) either set PHP-FPM option "catch_workers_output" to "yes"
2) either set php.ini option "error_log" to log file path (preferably)
------------------------------------------------------------------------
[2021-01-14 20:25:42] vicreal at yandex dot ru
Description:
------------
After fastcgi_finish_request() function error_log() not logging.
Before fastcgi_finish_request() function error_log() logging correctly.
Test script:
---------------
error_log('message'); // OK
fastcgi_finish_request();
fastcgi_finish_request();
error_log('message'); // no logging
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80628&edit=1