php.ini display_errors not respected OS X Server
I am running an 10.6.8 OS X Server. It acts as a web server using the built in PHP and Apache.
PHP is at 5.3.4 Apache is at 2.2.17
I am trying to disable the reporting or errors to end users with a server wide setting.
I have tried the following:
in PHP.ini
error_reporting = E_ALL & ~E_DEPRECATED
display_errors = Off
display_start开发者_如何学Goup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = Off
error_log = /dir/php_errors.log
The display_errors = Off is not being respected. When calling a php file that requires a string to be passed with it I will get error such as:
Notice: Undefined index: username in ......
I am able to suppress the error by adding the following code to the top of the php file being called:
ini_set("display_errors" , "0")
I have also tried adding variables to various apache .conf and .htaccess .files with the following code:
php_value display_errors 0
Errors are being written to my specified log correctly. Using phpinfo() I see that I am using the correct php.ini file, and display_errors is showing off.
Any ideas?
First off using a phpinfo()... check the location of the php.ini file. It may be referencing a different one from the one you think it should be.
精彩评论