0
我在CentOS上運行PHP 5.3。沒有將PHP警告寫入錯誤日誌。我的配置如下centOS php 5.3警告沒有記錄到錯誤日誌
php.ini
log_errors = On
error_reporting = E_ALL & ~E_DEPRECATED
我的虛擬主機的conf文件
<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說加載的配置文件\t /etc/php.ini這是我引用的文件 –
您確定在代碼中沒有調用error_reporting來覆蓋要記錄的錯誤嗎? – tlenss