Bug #79342 [NEW]: Syslog broken on FPM since PHP 7.3.0
From: mik dot linux at gmail dot com
Operating system:
PHP version: 7.3.15
Package: FPM related
Bug Type: Bug
Bug description:Syslog broken on FPM since PHP 7.3.0
Description:
------------
We use NGINX with FPM backend configured to write to syslog using custom
facility:
/etc/php-fpm.conf
-----------------
include=/etc/php-fpm.d/*.conf
[global]
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
/etc/php-fpm.d/www.conf
-----------------------
[www]
listen = /run/php-fpm-www.sock
listen.backlog = 1024
listen.allowed_clients =
listen.owner = nginx
listen.group = 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:
---------------
<?php
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
--
Edit bug report at https://bugs.php.net/bug.php?id=79342&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79342&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79342&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79342&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79342&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79342&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79342&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79342&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79342&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79342&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79342&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79342&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79342&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79342&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79342&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79342&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79342&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79342&r=mysqlcfg
Thread (7 messages)
- mik dot linux at gmail dot com