Home > Operation and Maintenance > Linux 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

王林
Release: 2020-10-19 11:07:49
Original
4256 people have browsed it

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
Copy after login

Or output phpinfo() in a php file; check the error log storage location

Check the log storage location

vi /etc/php.ini
Copy after login

Check the log:

tail -f -50 /var/php_errors.log
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template