How to disable PHP 5.3 Deprecated errors
Posted Fri, 02/05/2010 - 12:15am
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 = Offalso, 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 offafter your done... as always, restart apache...
service httpd restart
Comments
Thats your advice? Turn them
by Anonymous - 09/02/2010 - 8:02am
Thats your advice? Turn them off? Nice... :-/
I did but the same
by Anonymous - 02/01/2011 - 11:00pm
I did but the same problem.
"Deprecated: Function set_magic_quotes_runtime() is deprecated "
its ugly, but if you have to
by david - 02/09/2011 - 11:55am
its ugly, but if you have to run 3rd party php code you want to see the more important errors.
btw, you can selectively supress warnings for single things by putting an @ in front of the call. like @ereg(...) instead of ereg(...)
note that this is even worse than turning warnings off: you don't even notice in config files that you disabled something. and it also won't show any other warnings, its not just supressing depricated.
btw: depricated ultimately means you have to fix the code because some next release of php is going to remove that old function.
Thank you! It was the right
by Anonymous - 04/05/2011 - 9:18pm
Thank you! It was the right solution on my LAMP. No more errors on some joomla modules.
thank so mush
by antique - 10/28/2011 - 9:24am
thank so mush
Function split() is
by I need a website - 01/24/2012 - 11:08pm
Function split() is deprecated. I can't get rid of this message
Post new comment