error_porting 显示不需要的 NOTICE 日志

error_porting 显示不需要的 NOTICE 日志

我在 php 错误日志文件中收到以下通知。

[10-Mar-2011 13:58:39] PHP Notice:  require_once() [<a href='function.require-once'>function.require-once</a>]: 1. h-&gt;opened_path=[/home/www/XXXXX/Core/QAjax.php]  h-&gt;filename=[/home/www/XXXXX/include/project/Core/QAjax.php]
 in /home/www/XXXXX/modules/quantum_bootstrap.php on line 54
[10-Mar-2011 13:58:39] PHP Notice:  require_once() [<a href='function.require-once'>function.require-once</a>]: 1. h-&gt;opened_path=[/home/www/XXXXX/Core/Memcache.php]  h-&gt;filename=[/home/www/XXXXX/Core/Memcache.php]
 in /home/www/XXXXX/include/project/Core/QAjax.php on line 22
[10-Mar-2011 13:58:41] PHP Notice:  require_once() [<a href='function.require-once'>function.require-once</a>]: 1. h-&gt;opened_path=[/home/www/XXXXX/cache/Parameters.php]  h-&gt;filename=[/home/www/XXXXX/include/cache/Parameters.php]
 in /home/www/XXXXX/include/modules/quantum_bootstrap.php on line 15
[10-Mar-2011 13:58:41] PHP Notice:  require_once() [<a href='function.require-once'>function.require-once</a>]: 1. h-&gt;opened_path=[/home/www/XXXXX/include/modules/headers.php]  h-&gt;filename=[/home/www/XXXXX/include/modules/headers.php]
 in /home/www/XXXXX/include/modules/quantum_bootstrap.php on line 17

但是,我关闭了 php.ini 中的通知:

error_reporting = E_ALL & ~E_NOTICE

当我将其切换到 E_ERROR 时,它也出现在日志中。

我正在使用 php-cgi 和以下扩展:

Installed packages, channel pecl.php.net:
=========================================
Package   Version State
APC       3.1.7   beta
gearman   0.7.0   beta
memcache  2.2.6   stable
memcached 1.0.2   stable

Installed packages, channel pear.php.net:
=========================================
Package          Version  State
Archive_Tar      1.3.7    stable
Console_Getopt   1.3.1    stable
Log              1.12.5   stable
PEAR             1.9.2    stable
Structures_Graph 1.0.4    stable
System_Daemon    1.0.0RC1 beta
XML_Util         1.2.1    stable

答案1

问题自己解决了。php 脚本中有一个重新定义指令

error_reporting(E_ALL);

但是我还是不知道为什么它被归类为“PHP 通知”。

相关内容