PHP存储错误日志在哪里? (php5,apache,fastcgi,cpanel) [英] Where does PHP store the error log? (php5, apache, fastcgi, cpanel)

查看:91
本文介绍了PHP存储错误日志在哪里? (php5,apache,fastcgi,cpanel)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在共享主机上,有Cpanel,Apache,PHP由fastcgi运行。 PHP存储错误日志在哪里?



有没有其他方法可以在共享托管环境中找到错误日志,而不必通过整个站点结构来查找error_log文件?



我可以访问 php.ini (我使用的是PHP版本5.2.16)。

解决方案

Php存储错误日志 / var / log / apache2 if php是一个apache2模块。
共享主机通常将日志文件存储在根目录 / log 子文件夹中。
但是...如果您可以访问 php.ini 文件,您可以执行此操作:

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

根据 rinogo 的评论:如果您使用cPanel,您可能正在寻找的主日志文件(默认情况下)存储在

  / usr / local / apache / logs / error_log 

如果所有其他失败,您可以使用

 <?检查日志文件的位置php phpinfo(); ?> 


I am on shared hosting and have Cpanel, Apache, PHP is run by fastcgi. Where does PHP store the error log?

Is there any other way I can find the error log on shared hosting environment instead of having to go through entire site structure to look for error_log files?

I have access to the php.ini (I am using PHP version 5.2.16).

解决方案

Php stores error logs in /var/log/apache2 if php is an apache2 module. Shared hosts are often storing log files in your root directory /log subfolder. But...if you have access to a php.ini file you can do this:

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

/usr/local/apache/logs/error_log

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

<?php phpinfo(); ?>

这篇关于PHP存储错误日志在哪里? (php5,apache,fastcgi,cpanel)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆