Topic: php56-php-fpm STDOUT to proper stdout, not /dev/null

Hello,

By default php56-php-fpm /proc/pid/fd looks like this:

# ls -l /proc/1/fd
total 0
lrwx------. 1 root root 64 May 22 11:39 0 -> /dev/null
lrwx------. 1 root root 64 May 22 11:39 1 -> /dev/null
l-wx------. 1 root root 64 May 22 11:39 2 -> /opt/remi/php56/root/var/log/php-fpm/error.log
# etc..

Also:

# ls -l /dev/stdout
lrwxrwxrwx 1 root root 15 May 18 09:33 /dev/stdout -> /proc/self/fd/1

Is there any way to change the target of stdout (and stderr) to go to the regular STDOUT and STDERR?

We're running this on Centos7 docker image, and like all other containerised apps, we would want to have all logs go to proper STDOUT/ERR, not /dev/null or logfile.

I've found only some hacky dbg way of changeing it on the fly but that is no good.

Re: php56-php-fpm STDOUT to proper stdout, not /dev/null

Nothing wrong with default behavior which match FastCGI standard.

See comments in pool configuration, with explanation how to change this.

; 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.
; Note: on highloaded environement, this can cause some delay in the page
; process time (several ms).
; Default Value: no
;catch_workers_output = yes
Desktop: Fedora 25 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 24 x86_64 + remi (SCL only)
Hosting Server: CentOS 6.8 x86_64 + EPEL + remi + remi-php70