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.
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:
<?php phpinfo(); ?>
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!