How to disable PHP 5.3 Deprecated errors

If you installed PHP 5.3, then you may have noticed many deprecated errors from older web apps and even current ones--like some drupal modules.

NOTICE: this is not a true fix, you could be ignoring critical errors by doing the following... but most likely you should be fine... though make sure you do not log errors, or your log files will quickly grow to an unmanageable size.

anyhow...

via php.ini :

error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
; change this to Off if you still get errors.
display_errors = On
log_errors = Off

after your done... as always, restart apache...

service httpd restart

also, some sites may be using their own .htaccess or error_reporting... therefore you may need to go to affected ones and modify the .htaccess file and insert the following to disable PHP 5.3 ... I had to do this for really old web apps.

php_flag display_errors off
php_flag log_errors off

Tags: php drupal