Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
563 views
in Technique[技术] by (71.8m points)

command line interface - PHP CLI won't log errors

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

I have:

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

in file /etc/php5/cli/php.ini.

Am I missing a further setting to get this working?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Please check that the user account running PHP CLI has write access to /var/log/php_errors.log.

Additionally, you can verify that you are using the correct php.ini file like this:

php -a -c /etc/php5/cli/php.ini

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...