Bug #80628 [Opn]: error_log not working after fastcgi_finish_request

From: Date: Thu, 14 Jan 2021 22:38:16 +0000
Subject: Bug #80628 [Opn]: error_log not working after fastcgi_finish_request
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231569@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 User updated by: vicreal at yandex dot ru Reported by: vicreal at yandex dot ru Summary: error_log not working after fastcgi_finish_request Status: Open Type: Bug Package: *General Issues Operating System: Debian 10 x64 (4.19.132-1) PHP Version: 8.0.1 Block user comment: N Private report: N New Comment: 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) Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#231569) next »