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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vicreal at yandex dot ru
New email:
PHP Version: OS:

 

 [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 11:01:30 2024 UTC