Home>Article>Backend Development> Where is the php error log location?

Where is the php error log location?

藏色散人
藏色散人 Original
2020-08-19 09:28:48 7177browse

The PHP error log location is under the path "/var/log/apache2", and virtual hosts often store log files in the "/log" subfolder in the root directory.

Where is the php error log location?

Recommended: "PHP Video Tutorial"

If php is an apache2 module, PHP will store the error log in/ var/log/apache2.

Virtual hosts often store log files in the /log subfolder in the root directory.

If you have access to the php.ini file, you can specify the path by doing this:

error_log = /var/log/php-scripts.log

Per rinogo's comment: If using cPanel, you may want to look for the main log file (which is the default below) stored in

/usr/local/apache/logs/error_log

If all else fails, you can check the location of the log file using:

The above is the detailed content of Where is the php error log location?. 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