php.net |  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: 2021-12-12 04:22 UTC
Votes:1
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: bukka (profile)
Status: No Feedback Package: FPM related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
33 + 25 = ?
Subscribe to this entry?

 
 [2014-07-08 04:49 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-19 09:01 UTC] mike@php.net
-Package: Output Control +Package: FPM related
 [2021-12-04 22:01 UTC] bukka@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: bukka
 [2021-12-04 22:01 UTC] bukka@php.net
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.
 [2021-12-12 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Aug 09 20:05:45 2022 UTC