PHP stores error logs in /var/log/apache2
if PHP is an apache2 module.
(如果PHP是apache2模块,则PHP将错误日志存储在/var/log/apache2
。)
Shared hosts are often storing log files in your root directory /log
subfolder. (共享主机通常将日志文件存储在根目录/log
子文件夹中。)
But...if you have access to a php.ini
file you can do this: (但是...如果您有权访问php.ini
文件,则可以执行以下操作:)
error_log = /var/log/php-scripts.log
According to rinogo 's comment: If you're using cPanel, the master log file you're probably looking for is stored (by default) at
(根据rinogo的评论:如果您使用的是cPanel,则您可能要查找的主日志文件(默认情况下)存储在)
/usr/local/apache/logs/error_log
If all else fails you can check the location of the log file using
(如果其他所有方法均失败,则可以使用以下命令检查日志文件的位置)
<?php phpinfo(); ?>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…