How to stop E_DEPRECATED messages in the PHP log?

From: Date: Mon, 06 Jul 2009 21:16:09 +0000
Subject: How to stop E_DEPRECATED messages in the PHP log?
Groups: php.general 
Request: Send a blank email to php-general+get-294973@lists.php.net to get a copy of this message
Hi: I am hoping someone can help me figure this out.... I've just upgraded my PHP installation to 5.3.0. Now I am receiving thousands of log messages of the form "PHP Deprecated: ...". I know I have a number of scripts that use now-deprecated functions, etc. and I now know what those are, thanks to all the messages. However, this is now growing to (literally) gigabytes of log entries, so I'd like to stop the messages until I have the time to re-write all the offending scripts. I have tried the following error.reporting lines in php.ini: error_reporting = E_ALL & ~E_DEPRECATED & E_ERROR & E_WARNING & E_PARSE & E_NOTICE & E_CORE_ERROR & E_USER_ERROR & E_USER_WARNING & E_USER_NOTICE & E_COMPILE_ERROR & E_COMPILE_WARNING error_reporting = ~E_DEPRECATED & E_ALL & E_ERROR & E_WARNING & E_PARSE & E_NOTICE & E_CORE_ERROR & E_USER_ERROR & E_USER_WARNING & E_USER_NOTICE & E_COMPILE_ERROR & E_COMPILE_WARNING error_reporting = E_ALL & E_ERROR & E_WARNING & E_PARSE & E_NOTICE & E_CORE_ERROR & E_USER_ERROR & E_USER_WARNING & E_USER_NOTICE & E_COMPILE_ERROR & E_COMPILE_WARNING & ~E_DEPRECATED error_reporting = E_ERROR & E_CORE_ERROR & E_USER_ERROR & E_COMPILE_ERROR & E_COMPILE_WARNING & ~E_DEPRECATED error_reporting = ~E_DEPRECATED & E_ERROR & E_CORE_ERROR & E_USER_ERROR & E_COMPILE_ERROR & E_COMPILE_WARNING (as you can tell, I prefer verbose logs, but not that verbose...). None of these combinations have stopped the "PHP Deprecated: ..." messages. System info: Mac OS/X 10.5.7 Client version, PHP 5.3.0 running as a CGI under Apache 2.2.11 and as a CLI. Please let me know if there's any other info that might help. php_info() reports error.reporting as "0" Any help or guidance is appreciated!! Thanks, --Jeff No one ever achieved greatness by playing it safe. -Harry Gray

« previous php.general (#294973) next »