Skip to content

Fix GH-25077: Send captured FPM worker output to syslog - #25257

Open
localzet wants to merge 1 commit into
php:PHP-8.4from
localzet:fix/gh25077-fpm-worker-syslog
Open

localzet wants to merge 1 commit into
php:PHP-8.4from
localzet:fix/gh25077-fpm-worker-syslog

Conversation

@localzet

@localzet localzet commented Nov 7, 2026

Copy link
Copy Markdown

FPM sends the master's stderr to /dev/null when error_log=syslog. With catch_workers_output=yes, worker output was always routed to that stderr instead of the existing syslog logger. Choose ZLOG_SYSLOG when the master is configured to use it; otherwise keep the stderr path.

Add a Linux-only regression test that captures both worker stdout and stderr through a test-only LD_PRELOAD syslog interceptor, without needing a host syslog daemon. Skip if no compiler is available or PHP is 32-bit.

The interceptor was compiled and smoke-tested with a glibc syslog caller, including _FORTIFY_SOURCE=2. Native PHP-FPM tests still need to be run.

@localzet
localzet requested a review from bukka as a code owner November 7, 2026 00:16
The FPM master sends stderr to /dev/null when error_log=syslog.
Captured worker stdout/stderr previously always used that descriptor.
Route collected worker output to ZLOG_SYSLOG in syslog mode, keeping
regular stderr behavior unchanged otherwise.

Add a Linux syslog regression test that intercepts syslog calls using
LD_PRELOAD without a host syslog daemon. Allow the shim before libasan
for the test FPM subprocess so the sanitizer build can execute it.

Rebase onto current PHP-8.4 and resolve the NEWS conflict.
@localzet
localzet force-pushed the fix/gh25077-fpm-worker-syslog branch from 5b989c5 to e640a8f Compare November 7, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant