php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80628 error_log not working after fastcgi_finish_request
Submitted: 2021-01-14 20:25 UTC Modified: 2021-01-15 10:41 UTC
From: vicreal at yandex dot ru Assigned: cmb (profile)
Status: Closed Package: *General Issues
PHP Version: 8.0.1 OS: Debian 10 x64 (4.19.132-1)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
36 - 8 = ?
Subscribe to this entry?

 
 [2021-01-14 20:25 UTC] 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



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-01-14 22:38 UTC] 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-15 10:41 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-01-15 10:41 UTC] cmb@php.net
> This is not a bug.

Okay, I'm closing this ticket then.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 07:01:31 2024 UTC