I have a config to be used in production (not development) PHP site, where I want to hide all PHP errors to the user, but store them in a table in the database. I have the following config, but for some reason if I change the values of the defined constants (customized) to FALSE, I don't get the display error, but neither the database loging:
error_reporting(SHOW_E_ALL); // SHOW_E_ALL = 0 for production
ini_set('display_errors', SHOW_ERRORS); // SHOW_ERRORS = FALSE for production
ini_set('display_startup_errors', SHOW_ERRORS); // SHOW_ERRORS = FALSE for production
set_error_handler('myErrorFunction', E_ALL);
I have tried different combinations, but I get either the error display in the browser navigator and also the database log of the error, or no display and no log, and never the combination that I want: no display and error log into the database.