为什么codeigniter没有记录错误! [英] Why is codeigniter not logging error!

查看:87
本文介绍了为什么codeigniter没有记录错误!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些原因,我无法得到错误日志工作,我得到死亡的白色屏幕,我希望错误日志将能够揭示一些光的情况!

For some reason I cannot get the error logging to work, I'm getting the white screen of death and I'm hoping an error log will be able to shed some light on the situation!

我的index.php有

My index.php has

error_reporting(E_ALL);

error_reporting(E_ALL);

我也确认系统/ logs目录有适当的权限,

I have also made sure that the system/logs directory has appropriate permissions,

负载像什么发生的一个错误,甚至GET记录?如果它不是我有大量的代码,我必须搜索语法错误,任何建议如何使php错误吐出将有助于!

If the page fails to load like whats happening does an error even GET logged? If it doesn't I have a huge amount of code that I would have to search through for syntax errors, any advice on how to make the php errors spit out would help!

另外,这是我的配置


`
|--------------------------------------------------------------------------
| 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错误。

All that's in my system/logs is an index.html which has a 403 error in it.

推荐答案

如果页面由于解析错误而无法加载,那么它将永远不会执行

If the page is failing to load because of a parse error, then it'll never execute

error_reporting(E_ALL);

所以你的脚本永远不会知道输出错误。修改您的php.ini文件以确保您具有:

so you script will never know to output the error. Edit your php.ini file to make sure you have:

error_reporting = E_ALL
error_log = "/path/to/some/apache/writable/file"

这篇关于为什么codeigniter没有记录错误!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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