I have a production server running commercial software that utilizes deprecated functionality. We already disabled error outputs in php.ini -- display_errors = Off
-- so users are not seeing these errors. However we are still logging PHP errors -- log_errors = On
-- in order to track down issues.
The issue: PHP seems to ignore the error_reporting
directive in regards to what it ultimately passes to the error log. No matter what combination of values are entered, the file logging occurs as if I'm set to E_ALL
. My error log is consequently bloated with deprecation notices.
A default timezone value is set in php.ini, so timezone-related issues are not relevant.
Upgrades for the software package are not available yet, so please no recommendations to "just fix the deprecated code." I'm looking specifically for ways to prevent PHP from dumping deprecated errors into the log without disabling file logging entirely.
Server details:
- Ubuntu 10.04.2 LTS
- PHP 5.3.2