PHP CLI不会记录错误 [英] PHP CLI won't log errors
本文介绍了PHP CLI不会记录错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
PHP当前不会记录命令行产生的错误.
PHP currently will not log errors produced from the command line.
我有:
log_errors = On
error_log = /var/log/php_errors.log
在/etc/php5/cli/php.ini中
in /etc/php5/cli/php.ini
我是否需要进一步设置才能使它正常工作?
Am I missing a further setting to get this working?
推荐答案
请检查运行PHP CLI的用户帐户是否具有对/var/log/php_errors.log
的写权限.
Please check that the user account running PHP CLI has write access to /var/log/php_errors.log
.
此外,您可以验证您使用的是正确的php.ini文件,如下所示:
Additionally, you can verify that you are using the correct php.ini file like this:
php -a -c /etc/php5/cli/php.ini
这篇关于PHP CLI不会记录错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文