Bug #73886 [Com]: Handle access log & error log on Docker

From: Date: Thu, 08 Aug 2019 11:36:28 +0000
Subject: Bug #73886 [Com]: Handle access log & error log on Docker
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222136@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73886&edit=1 ID: 73886 Comment by: yudkin146 at gmail dot com Reported by: tchiot dot ludo at gmail dot com Summary: Handle access log & error log on Docker Status: Assigned Type: Bug Package: FPM related Operating System: Docker PHP Version: 7.1.0 Assigned To: bukka Block user comment: N Private report: N New Comment: Faced with same problem. Can not write to "/dev/stderr" or even "/proc/self/fd/2" from php-fpm, but can do it from "php -r" or bash or anything else. file_put_contents(/proc/self/fd/2): failed to open stream: No such file or directory I use docker image php:7-fpm with full standard config. Previous Comments: ------------------------------------------------------------------------ [2017-01-07 08:23:47] tchiot dot ludo at gmail dot com Description: ------------ On Dockerfile, the official distribution of php have this configuration : [global] error_log = /proc/self/fd/2 ; if we send this to /proc/self/fd/1, it never appears access.log = /proc/self/fd/2 seems related to this configuration : catch_workers_output boolean Redirect worker stdout and stderr into main error log. If not set, stdout and stderr will be redirected to /dev/null according to FastCGI specs. Default value: no. With this configuration, we can't really parse log file (or monitor log) because access log & php fpm stdout & error log in not separated. see dockerfile maintainer response : https://github.com/docker-library/php/issues/358#issuecomment-271033464 So there is 2 issues here : - access log won't write to docker special files : /dev/stdout - fpm main log with catch_workers_output = yes output stdout & stderr on the same log file, maybe we need a new configuration options in order to have workers output error to stderr & fpm master process std*** to std*** ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73886&edit=1

« previous php.bugs (#222136) next »