|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79342 Syslog broken on FPM since PHP 7.3.0
Submitted: 2020-03-04 11:12 UTC Modified: 2021-09-28 10:18 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: mik dot linux at gmail dot com Assigned:
Status: Open Package: FPM related
PHP Version: 7.3.15 OS:
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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
30 - 22 = ?
Subscribe to this entry?

 [2020-03-04 11:12 UTC] mik dot linux at gmail dot com
We use NGINX with FPM backend configured to write to syslog using custom facility: 

error_log = syslog
syslog.facility = local3
syslog.ident = php-fpm
log_level = notice
emergency_restart_threshold = 0
emergency_restart_interval = 0
process_control_timeout = 0
daemonize = yes

listen = /run/php-fpm-www.sock
listen.backlog = 1024
listen.allowed_clients = 
listen.owner = nginx = nginx
listen.mode = 0660
user = phpwww
group = phpwww
pm = static
pm.max_children = 8
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_requests = 512
catch_workers_output = yes

Until latest release of PHP 7.2 (and lower), this configuration was working fine and logs were correctly written to syslog as expected, but after upgrading to PHP 7.3.x or even 7.4.x, this doesn't work anymore. The only entries forwarded to syslog are those related to FPM startup and any other error (eg. syntax errors) is not being catched.

If we switch php-fpm logging to file then logs are correctly written to that file, so the issue exists only with syslog.

Test script:
error_log('some error');

Expected result:
New syslog entry is created:
Mar  3 12:00:42 web php-fpm[xxx]: [WARNING] [pool www] child xxx said into stderr: "NOTICE: PHP message: some error"

Actual result:
No syslog entry is created


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-23 20:03 UTC] felipee dot owd at gmail dot com
php_admin_value[error_log] = syslog
at www.conf or 
error_log = syslog
in your php.conf
 [2022-12-20 08:09 UTC] amsin dot jabari242 at gmail dot com
Thanks for that. 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 22 14:01:29 2024 UTC