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

Where is the php error log location?

藏色散人
Release: 2023-03-04 18:18:01
Original
7309 people have browsed it

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

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

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

<?php phpinfo(); ?>
Copy after login

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!

Related labels:
php
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