From d98ec294e7bdcce25af0e5338be42d0f163dfdd0 Mon Sep 17 00:00:00 2001 From: Elijah Duffy Date: Mon, 8 Dec 2025 02:59:49 -0800 Subject: [PATCH] php-fpm: try to fix hidden error logs --- php-fpm/7.4/Dockerfile | 2 +- php-fpm/7.4/www.conf | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/php-fpm/7.4/Dockerfile b/php-fpm/7.4/Dockerfile index 4dfeb7f..01244c6 100644 --- a/php-fpm/7.4/Dockerfile +++ b/php-fpm/7.4/Dockerfile @@ -92,7 +92,7 @@ RUN set -eux; \ } > /usr/local/etc/php/conf.d/zz-opcache.ini; \ { \ echo 'expose_php = Off'; \ - echo 'display_errors = Off'; \ + echo 'display_errors = On'; \ echo 'log_errors = On'; \ echo 'error_log = /proc/self/fd/2'; \ } > /usr/local/etc/php/conf.d/zz-hardening.ini diff --git a/php-fpm/7.4/www.conf b/php-fpm/7.4/www.conf index 9e79965..76906a7 100644 --- a/php-fpm/7.4/www.conf +++ b/php-fpm/7.4/www.conf @@ -45,6 +45,9 @@ slowlog = /var/log/php/www-slow.log ; This ensures that any `echo` or `var_dump` calls from workers are captured in the container logs. catch_workers_output = yes +; Allow worker processes to write to stderr, which is essential for container logging. +decorate_workers_output = no + ; We are logging errors to stderr in zz-hardening.ini, so we can disable the FPM access log ; to avoid redundant logging and improve performance. Nginx should handle access logging. ; access.log = /var/log/php/www-access.log