如何将 PHP 错误写入 stderr?

mat*_*tes 5 php logging stdout stderr

如何更改 php-fpm.conf(或 php.ini),以便将所有错误/警告/...写入标准错误(或替代标准输出)?

我跑php5-fpmdaemonize = no,并希望看到我的终端的所有错误。

mat*_*tes 7

解决方法是设置...

; 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
Run Code Online (Sandbox Code Playgroud)