出于某种原因,我无法让错误记录工作,我得到死亡的白屏,我希望错误日志能够揭示情况!
我的index.php有
的error_reporting(E_ALL);
我还确保system / logs目录具有适当的权限,
如果页面无法加载,就会发生什么,甚至GET都会记录错误?如果不是,我有大量的代码,我将不得不搜索语法错误,任何有关如何使php错误吐出的建议都会有所帮助!
另外,这是我的配置
` |-------------------------------------------------------------------------- | Error Logging Threshold |-------------------------------------------------------------------------- | | If you have enabled error logging, you can set an error threshold to | determine what gets logged. Threshold options are: | You can enable error logging by setting a threshold over zero. The | threshold determines what gets logged. Threshold options are: | | 0 = Disables logging, Error logging TURNED OFF | 1 = Error Messages (including PHP errors) | 2 = Debug Messages | 3 = Informational Messages | 4 = All Messages | | For a live site you'll usually only enable Errors (1) to be logged otherwise | your log files will fill up very fast. | */ $config['log_threshold'] = 1; /* |-------------------------------------------------------------------------- | Error Logging Directory Path |-------------------------------------------------------------------------- | | Leave this BLANK unless you would like to set something other than the default | system/logs/ folder. Use a full server path with trailing slash. | */ $config['log_path'] = ''; `
我系统/日志中的所有内容都是index.html,其中包含403错误。
答案 0 :(得分:16)
如果页面由于解析错误而无法加载,那么它将永远不会执行
error_reporting(E_ALL);
所以你的脚本永远不会知道输出错误。编辑您的php.ini文件以确保您拥有:
error_reporting = E_ALL
error_log = "/path/to/some/apache/writable/file"