php apc CI 框架 出现错误 谁帮忙看一下
php版本 5.3服务器系统 linux
在php.ini 加了extension = apc.so 后出现
Notice: require_once() : 1. h->opened_path= h->filename= in /home/kdsoft/ci/index.php on line 202
Notice: require_once() : apc_cache_find in /home/kdsoft/ci/index.php on line 202
Notice: require_once() : 2. h->opened_path= h->filename= in /home/kdsoft/ci/index.php on line 202
Notice: require_once() : apc_cache_make_file_entry: entry->data.file.filename is in /home/kdsoft/ci/index.php on line 202
Notice: require_once() : Inserting in /home/kdsoft/ci/index.php on line 202
Notice: require() : 1. h->opened_path= h->filename= in /home/kdsoft/ci/system/core/CodeIgniter.php on line 51
Notice: require() : apc_cache_find in /home/kdsoft/ci/system/core/CodeIgniter.php on line 51
Notice: require() : 2. h->opened_path= h->filename= in /home/kdsoft/ci/system/core/CodeIgniter.php on line 51
Notice: require() : apc_cache_make_file_entry: entry->data.file.filename is in /home/kdsoft/ci/system/core/CodeIgniter.php on line 51
Notice: require() : Inserting in /home/kdsoft/ci/system/core/CodeIgniter.php on line 51
Notice: require() : 1. h->opened_path= h->filename= in /home/kdsoft/ci/system/core/CodeIgniter.php on line 64
Notice: require() : apc_cache_find in /home/kdsoft/ci/system/core/CodeIgniter.php on line 64
Notice: require() : 2. h->opened_path= h->filename= in /home/kdsoft/ci/system/core/CodeIgniter.php on line 64
Notice: require() : apc_cache_make_file_entry: entry->data.file.filename is in /home/kdsoft/ci/system/core/CodeIgniter.php on line 64
Notice: require() : Inserting in /home/kdsoft/ci/system/core/CodeIgniter.php on line 64
Notice: require() : 1. h->opened_path= h->filename= in /home/kdsoft/ci/system/core/Common.php on line 145
Notice: require() : apc_cache_find in /home/kdsoft/ci/system/core/Common.php on line 145
Notice: require() : 2. h->opened_path= h->filename= in /home/kdsoft/ci/system/core/Common.php on line 145
Notice: require() : apc_cache_make_file_entry: entry->data.file.filename is in /home/kdsoft/ci/system/core/Common.php on line 145
Notice: require() : Inserting in /home/kdsoft/ci/system/core/Common.php on line 145
Notice: require() : 1. h->opened_path= h->filename= in /home/kdsoft/ci/system/core/Common.php on line 237
Notice: require() : apc_cache_find in /home/kdsoft/ci/system/core/Common.php on line 237
Notice: require() : 2. h->opened_path= h->filename= in /home/kdsoft/ci/system/core/Common.php on line 237
Notice: require() : apc_cache_make_file_entry: entry->data.file.filename is in /home/kdsoft/ci/system/core/Common.php on line 237
Notice: require() : Inserting in /home/kdsoft/ci/system/core/Common.php on line 237
Notice: include() : 1. h->opened_path= h->filename= in /home/kdsoft/ci/system/core/Exceptions.php on line 182
Notice: include() : apc_cache_find in /home/kdsoft/ci/system/core/Exceptions.php on line 182
Notice: include() : 2. h->opened_path= h->filename= in /home/kdsoft/ci/system/core/Exceptions.php on line 182
Notice: include() : apc_cache_make_file_entry: entry->data.file.filename is in /home/kdsoft/ci/system/core/Exceptions.php on line 182
Notice: include() : Inserting in /home/kdsoft/ci/system/core/Exceptions.php on line 182
A PHP Error was encountered
Severity: Notice
Message: require() : 1. h->opened_path= h->filename=
Filename: core/Common.php
Line Number: 145
Notice: include() : 1. h->opened_path= h->filename= in /home/kdsoft/ci/system/core/Exceptions.php on line 182
Notice: include() : apc_cache_find in /home/kdsoft/ci/system/core/Exceptions.php on line 182
A PHP Error was encountered
Severity: Notice
Message: require() : apc_cache_find
Filename: core/Common.php
Line Number: 145
我也碰到了这个问题。我暂时的做法是 把 apc 源码中apc_debug的调用都去掉。重新编译apc就好了。
怀疑是 哪里把这个debug信息当做err信息输出,导致网页访问不了。
应该有其他的解决方法,但我暂时就会这么多了。 本帖最后由 TurboY 于 2015-3-16 10:54 编辑
这个问题我也遇到,查阅了一些资料后解决了。现在分享一下吧:
"Notice:"类的信息一般是不必输出的,所以php.ini里的默认值是“error_reporting=E_ALL & ~E_NOTICE”,但CodeIgniter在开发环境里的错误报告默认为“E_ALL”,即显示所有信息,这样就把APC模块中的一些调试信息也输出了。
所以把 index.php文件中的 “development”环境下的错误报告级别调整为不显示“~E_NOTICE”类型的错误信息即可。大约在第 36 行,原代码是:
error_reporting(E_ALL);
修改为下面的即可。
error_reporting(E_ALL & ~E_NOTICE);
页:
[1]