用户
 找回密码
 入住 CI 中国社区
搜索
查看: 4743|回复: 2
收起左侧

[HELP] php apc CI 框架 出现错误 谁帮忙看一下

[复制链接]
发表于 2012-6-26 16:03:14 | 显示全部楼层 |阅读模式
php版本 5.3
服务器系统 linux
在php.ini 加了  extension = apc.so 后出现

Notice: require_once() [function.require-once]: 1. h->opened_path=[/home/kdsoft/ci/system/core/CodeIgniter.php] h->filename=[/home/kdsoft/ci/system/core/CodeIgniter.php] in /home/kdsoft/ci/index.php on line 202

Notice: require_once() [function.require-once]: apc_cache_find [18483277] in /home/kdsoft/ci/index.php on line 202

Notice: require_once() [function.require-once]: 2. h->opened_path=[/home/kdsoft/ci/system/core/CodeIgniter.php] h->filename=[/home/kdsoft/ci/system/core/CodeIgniter.php] in /home/kdsoft/ci/index.php on line 202

Notice: require_once() [function.require-once]: apc_cache_make_file_entry: entry->data.file.filename is [/home/kdsoft/ci/system/core/CodeIgniter.php] in /home/kdsoft/ci/index.php on line 202

Notice: require_once() [function.require-once]: Inserting [/home/kdsoft/ci/system/core/CodeIgniter.php] in /home/kdsoft/ci/index.php on line 202

Notice: require() [function.require]: 1. h->opened_path=[null] h->filename=[/home/kdsoft/ci/system/core/Common.php] in /home/kdsoft/ci/system/core/CodeIgniter.php on line 51

Notice: require() [function.require]: apc_cache_find [18483278] in /home/kdsoft/ci/system/core/CodeIgniter.php on line 51

Notice: require() [function.require]: 2. h->opened_path=[/home/kdsoft/ci/system/core/Common.php] h->filename=[/home/kdsoft/ci/system/core/Common.php] in /home/kdsoft/ci/system/core/CodeIgniter.php on line 51

Notice: require() [function.require]: apc_cache_make_file_entry: entry->data.file.filename is [/home/kdsoft/ci/system/core/Common.php] in /home/kdsoft/ci/system/core/CodeIgniter.php on line 51

Notice: require() [function.require]: Inserting [/home/kdsoft/ci/system/core/Common.php] in /home/kdsoft/ci/system/core/CodeIgniter.php on line 51

Notice: require() [function.require]: 1. h->opened_path=[null] h->filename=[application/config/constants.php] in /home/kdsoft/ci/system/core/CodeIgniter.php on line 64

Notice: require() [function.require]: apc_cache_find [18483323] in /home/kdsoft/ci/system/core/CodeIgniter.php on line 64

Notice: require() [function.require]: 2. h->opened_path=[/home/kdsoft/ci/application/config/constants.php] h->filename=[application/config/constants.php] in /home/kdsoft/ci/system/core/CodeIgniter.php on line 64

Notice: require() [function.require]: apc_cache_make_file_entry: entry->data.file.filename is [/home/kdsoft/ci/application/config/constants.php] in /home/kdsoft/ci/system/core/CodeIgniter.php on line 64

Notice: require() [function.require]: Inserting [/home/kdsoft/ci/application/config/constants.php] in /home/kdsoft/ci/system/core/CodeIgniter.php on line 64

Notice: require() [function.require]: 1. h->opened_path=[null] h->filename=[/home/kdsoft/ci/system/core/Exceptions.php] in /home/kdsoft/ci/system/core/Common.php on line 145

Notice: require() [function.require]: apc_cache_find [18483281] in /home/kdsoft/ci/system/core/Common.php on line 145

Notice: require() [function.require]: 2. h->opened_path=[/home/kdsoft/ci/system/core/Exceptions.php] h->filename=[/home/kdsoft/ci/system/core/Exceptions.php] in /home/kdsoft/ci/system/core/Common.php on line 145

Notice: require() [function.require]: apc_cache_make_file_entry: entry->data.file.filename is [/home/kdsoft/ci/system/core/Exceptions.php] in /home/kdsoft/ci/system/core/Common.php on line 145

Notice: require() [function.require]: Inserting [/home/kdsoft/ci/system/core/Exceptions.php] in /home/kdsoft/ci/system/core/Common.php on line 145

Notice: require() [function.require]: 1. h->opened_path=[null] h->filename=[application/config/config.php] in /home/kdsoft/ci/system/core/Common.php on line 237

Notice: require() [function.require]: apc_cache_find [18483322] in /home/kdsoft/ci/system/core/Common.php on line 237

Notice: require() [function.require]: 2. h->opened_path=[/home/kdsoft/ci/application/config/config.php] h->filename=[application/config/config.php] in /home/kdsoft/ci/system/core/Common.php on line 237

Notice: require() [function.require]: apc_cache_make_file_entry: entry->data.file.filename is [/home/kdsoft/ci/application/config/config.php] in /home/kdsoft/ci/system/core/Common.php on line 237

Notice: require() [function.require]: Inserting [/home/kdsoft/ci/application/config/config.php] in /home/kdsoft/ci/system/core/Common.php on line 237

Notice: include() [function.include]: 1. h->opened_path=[null] h->filename=[application/errors/error_php.php] in /home/kdsoft/ci/system/core/Exceptions.php on line 182

Notice: include() [function.include]: apc_cache_find [18483313] in /home/kdsoft/ci/system/core/Exceptions.php on line 182

Notice: include() [function.include]: 2. h->opened_path=[/home/kdsoft/ci/application/errors/error_php.php] h->filename=[application/errors/error_php.php] in /home/kdsoft/ci/system/core/Exceptions.php on line 182

Notice: include() [function.include]: apc_cache_make_file_entry: entry->data.file.filename is [/home/kdsoft/ci/application/errors/error_php.php] in /home/kdsoft/ci/system/core/Exceptions.php on line 182

Notice: include() [function.include]: Inserting [/home/kdsoft/ci/application/errors/error_php.php] in /home/kdsoft/ci/system/core/Exceptions.php on line 182

A PHP Error was encountered
Severity: Notice

Message: require() [function.require]: 1. h->opened_path=[null] h->filename=[/home/kdsoft/ci/system/core/Benchmark.php]

Filename: core/Common.php

Line Number: 145


Notice: include() [function.include]: 1. h->opened_path=[null] h->filename=[application/errors/error_php.php] in /home/kdsoft/ci/system/core/Exceptions.php on line 182

Notice: include() [function.include]: apc_cache_find [18483313] in /home/kdsoft/ci/system/core/Exceptions.php on line 182

A PHP Error was encountered
Severity: Notice

Message: require() [function.require]: apc_cache_find [18483276]

Filename: core/Common.php

Line Number: 145
发表于 2013-4-21 17:33:32 | 显示全部楼层
我也碰到了这个问题。我暂时的做法是 把 apc 源码中apc_debug的调用都去掉。重新编译apc就好了。
怀疑是 哪里把这个debug信息当做err信息输出,导致网页访问不了。
应该有其他的解决方法,但我暂时就会这么多了。
发表于 2015-3-16 10:49:38 | 显示全部楼层
本帖最后由 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 行,原代码是:
PHP复制代码
                        error_reporting(E_ALL);
 
复制代码

修改为下面的即可。
PHP复制代码
                        error_reporting(E_ALL & ~E_NOTICE);
 
复制代码

评分

参与人数 1威望 +2 收起 理由
Closer + 2 感謝分享

查看全部评分

本版积分规则