Req #67589 [Opn->Fbk]: With --nodaemonize errors don't get into error_log directive

From: Date: Sat, 04 Dec 2021 22:01:35 +0000
Subject: Req #67589 [Opn->Fbk]: With --nodaemonize errors don't get into error_log directive
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238182@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67589&edit=1 ID: 67589 Updated by: bukka@php.net Reported by: serge dot rivest at gmail dot com Summary: With --nodaemonize errors don't get into error_log directive -Status: Open +Status: Feedback Type: Feature/Change Request Package: FPM related Operating System: Linux PHP Version: Irrelevant -Assigned To: +Assigned To: bukka Block user comment: N Private report: N New Comment: Sorry for very late replay but this looks like a distro issue to me as it might have overwrite the config maybe. If you still think it's FPM issue and you can see it for the latest version (preferably with supported init system), please post here your config and a bit more info about your setup. Previous Comments: ------------------------------------------------------------------------ [2014-07-08 04:49:08] serge dot rivest at gmail dot com Description: ------------ When running php-fpm with --nodaemonize, error_log is not respected. Instead, messages appear on the console (assuming STDOUT). This is an issue since distro started to use upstartd and launch php-fpm this way: exec /usr/sbin/php5-fpm --nodaemonize --fpm-config /etc/php5/fpm/php-fpm.conf which means the output doesn't get written into what is defined in the configuration. Instead it ends up being caught by upstartd and dumped into something like: /var/log/upstart/php5-fpm.log Test script: --------------- $ /usr/sbin/php5-fpm --daemonize ... error_log directive is respected, all error / warning / notice / debug go into log file. $ /usr/sbin/php5-fpm --nodaemonize ... error_log is not respected. Debug and notice get out on STDOUT / STDERR. Expected result: ---------------- It would be better if the error_log directive was always respected or if there was a command line option to use to force logging to file instead of STDOUT when the --nodaemonize option is used. $ /usr/sbin/php5-fpm --nodaemonize --force-log or something the like, or simply duplicate to error_log and STDOUT. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67589&edit=1

« previous php.bugs (#238182) next »