|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-03-22 14:29 UTC] haertl dot mike at gmail dot com
Description: ------------ When you write to STDOUT PHP-FPM creates a warning. This is a problem when you want to run PHP-FPM in a docker container. It's common pratice for docker containers to write any log output to STDOUT/STDERR. If you do this with e.g. with the official php-fpm docker image, you'll end up with tons of ugly warnings like above. Right now there's no way to get rid of these warnings. It will also split up a single multi-line output into several distinct warnings. Related issue at docker: https://github.com/docker-library/php/issues/207 Test script: --------------- $fp = @fopen('php://stdout','w'); fwrite($fp, "my output string..."); Expected result: ---------------- There should be an ini-Setting to turn off these warnings. Actual result: -------------- WARNING: [pool www] child 12 said into stdout: "my output string..." PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 08:00:01 2025 UTC |
To makes the php-fpm error logging not crappy I ended up putting mkfifo /tmp/stdout && chmod 777 /tmp/stdout in my a run statement in my Dockerfile, and also setting error_log = /tmp/stdout access.log = /tmp/stdout in a php config `.ini` file and php-fpm | tail -f /tmp/stdout in my docker-compose command call. The result is clean PHP error logging.