|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #67589 With --nodaemonize errors don't get into error_log directive
Submitted: 2014-07-08 04:49 UTC Modified: 2014-11-19 09:01 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: serge dot rivest at gmail dot com Assigned:
Status: Open Package: FPM related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: serge dot rivest at gmail dot com
New email:
PHP Version: OS:


 [2014-07-08 04:49 UTC] serge dot rivest at gmail dot com
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:


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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-19 09:01 UTC]
-Package: Output Control +Package: FPM related
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jun 18 07:01:23 2021 UTC