Bug #61045 [Com]: fpm don't send error log to fastcgi clients(nginx)
| From: | silvio dot ventres at gmail dot com | Date: | Mon, 23 Apr 2012 19:29:19 +0000 |
| Subject: | Bug #61045 [Com]: fpm don't send error log to fastcgi clients(nginx) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-169908@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61045&edit=1
ID: 61045
Comment by: silvio dot ventres at gmail dot com
Reported by: lxlight at gmail dot com
Summary: fpm don't send error log to fastcgi clients(nginx)
Status: Assigned
Type: Bug
Package: FPM related
Operating System: Linux
PHP Version: 5.3.10
Assigned To: fat
Block user comment: N
Private report: N
New Comment:
The link to the patch got mangled:
http://git.php.net/?p=php-
src.git;a=commitdiff;h=7fc36a5210e3066ad9b1ddff2e142e7a971ae1e9
http://goo.gl/11Whb
Previous Comments:
------------------------------------------------------------------------
[2012-04-23 19:27:40] silvio dot ventres at gmail dot com
Tracked the change through git/svn.
There is a zlog facility in php-fpm which provides output of operational errors,
while fastcgi error logging facility is used to output application level errors.
You can see how merging those into a single zlog which works on both seems like
a good idea, but currently zlog does not even know what fpm is, having no access
to fpm/fcgi variables or functions.
So then, a patch "generalized" the behavior, and now all logs go through zlog.
Unfortunately, zlog has no means of transporting the errors through fastcgi
interface, and so fastcgi logging was lost.
This is the patch in question: http://git.php.net/?p=php-
src.git;a=commitdiff;h=7fc36a5210e3066ad9b1ddff2e142e7a971ae1e9
The solution is either to revert this patch, or, which was probably the goal of
the patch submitter, complete the zlog facility so it supports FastCGI natively.
Since it doesn't seem like anyone fixed the zlog facility for half a year (since
October 2011), it does seem simpler to revert the patch, or at least set it up
as an option...
------------------------------------------------------------------------
[2012-04-04 12:58:34] tobi at portfolio dot hu
The same here, I tried every php.ini and php-fpm.conf log setups, nothing works
with Nginx 1.0.11 + PHP 5.3.10 FastCGI, even setting catch_workers_output = yes
does not
work.
I dont know why this functionality was cutted out but our sites use logging via
stderr + nginx, please solve it.
------------------------------------------------------------------------
[2012-03-29 09:36:44] kustodian at gmail dot com
I wouldn't mind that change, but setting "catch_workers_output = yes" doesn't
work for me with PHP 5.3.10 and Nginx 1.0.14 on Centos 6.2.
------------------------------------------------------------------------
[2012-03-29 08:10:55] bitmand at gmail dot com
Same here on 5.3.9 and .10 on apache. Errors used to go to apache error log, but
after 5.3.9 nothing gets logged.
I wonder if the change is actually by design, according to the php-fpm
documentation for "catch_workers_output" is states that "If not set, stdout and
stderr will be redirected to /dev/null according to FastCGI specs."
But it would definitely be great with and option to throw errors to stderr again.
------------------------------------------------------------------------
[2012-03-28 14:45:25] kustodian at gmail dot com
Exact same problem on Centos 6.2 with a custom build PHP 5.3.10. I reverted back to 5.3.8 since I
need to have PHP errors in the Nginx error.log.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=61045
--
Edit this bug report at https://bugs.php.net/bug.php?id=61045&edit=1