PHP CLI won't log errors

前端 未结 6 1144
情书的邮戳
情书的邮戳 2020-12-13 06:23

PHP currently will not log errors produced from the command line.

I have :

log_errors = On
error_log = /var/log/php_errors.log

in

6条回答
  •  北海茫月
    2020-12-13 06:37

    If you can't figure out what why or perhaps don't have user permissions on php.ini, another way to debug a no-information parse error is to wrap your php source in another php source with body something like:

    ini_set('display_errors',1);
    error_reporting(E_ALL);
    
    include "mybustedfile.php";
    

提交回复
热议问题