I am using CodeIgniter and I have added the following lines to my index.php:
error_reporting(E_ALL ^ E_NOTICE); ini_set('display_errors', 0); ini_set('log_errors', 1); ini_set('error_log', $_SERVER['DOCUMENT_ROOT'] . '/php_errors.log');
For some reason, however, PHP always displays warnings / errors anyway and does not create a log in the directory for writing. I know this code got there because if I delete the "^ E_NOTICES" part and resubmit, I will see a lot of notifications. I also threw a die () statement after the above code to make sure it hit. Finally, I grepped the entire codebase to verify that "display_errors" was not used later in the code, overwriting my 0 value.
Is there anything else I can lose that prevents me from stopping the error display?
source share