【问题标题】:centOS php 5.3 warnings are not logged to the error logcentOS php 5.3 警告未记录到错误日志中
【发布时间】: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 来覆盖要记录的错误吗?

标签: php apache centos


【解决方案1】:

更改你的 php.ini 后重启服务器

【讨论】:

    猜你喜欢
    • 2017-06-05
    • 2019-06-11
    • 1970-01-01
    • 1970-01-01
    • 2013-01-22
    • 1970-01-01
    • 2022-06-10
    • 2015-08-03
    • 2014-10-07
    相关资源
    最近更新 更多