Home  >  Article  >  Operation and Maintenance  >  How to check the location of php error log under linux

How to check the location of php error log under linux

王林
王林Original
2020-10-19 11:07:494250browse

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.

How to check the location of php error log under linux

View the error log storage address through php.ini

(Recommended tutorial: linux video tutorial )

echo &#39;<?php phpinfo(); ?>&#39; | 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn