【发布时间】:2013-08-16 10:34:24
【问题描述】:
我在 CentOS 上运行 PHP 5.3。没有将 PHP 警告写入错误日志。我的配置如下
php.ini
log_errors = On
error_reporting = E_ALL & ~E_DEPRECATED
我的虚拟主机配置文件
<VirtualHost *:9101>
DocumentRoot /home/parvhraban/domains/src/www_root
php_value include_path ".:/home/parvhraban/phplibs:/home/parvhraban/domains/src/local_libs"
ErrorLog /home/parvhraban/log/error9101.log
CustomLog /home/parvhraban/log/access9101.log common
</VirtualHost>
似乎设置正确,但只记录了致命错误。我在这里错过了什么?
【问题讨论】:
-
你确定这些设置被代码看到了吗?
-
conf 文件绝对有效,因为我可以看到错误日志并访问虚拟主机本身。 phpinfo 说 Loaded Configuration File /etc/php.ini 这是我引用的文件
-
您确定您的代码中没有调用 error_reporting 来覆盖要记录的错误吗?