How to check the location of the php error log under Linux: You can check the location of the error log by executing the [echo '' | php 2>&1 |grep -i error_log] command.
View the error log storage address through php.ini
(Recommended tutorial: linux video tutorial )
echo '<?php phpinfo(); ?>' | php 2>&1 |grep -i error_log
Or output phpinfo() in a php file; check the error log storage location
Check the log storage location
vi /etc/php.ini
Check the log:
tail -f -50 /var/php_errors.log
In addition to general error output, PHP also allows sending customized messages to the system syslog.
Related recommendations: linux tutorial
The above is the detailed content of How to check the location of php error log under linux. For more information, please follow other related articles on the PHP Chinese website!