Welcome Guest, Not a member yet? Register   Sign In
switching off error messages
#1

[eluser]Unknown[/eluser]
I am having problems switching off error messages in production code.

Here is a part of index.php


if (defined('ENVIRONMENT'))
{
switch (ENVIRONMENT)
{
case 'development':
error_reporting(E_ALL);
break;

case 'testing':
case 'production':
ini_set('display_errors', 'Off');
break;

default:
exit('The application environment is not set correctly.');
}
}


ini_set('display_errors', 'Off'); should do it .... or might it conflict with php.ini settings on the production server ?

Any thoughts ?

THanks.

#2

[eluser]TheFuzzy0ne[/eluser]
Sorry, but what is it you're having problems with? From what I can see, what you have should do the trick. All you're doing it overriding the php.ini setting for the current request. It's not permanent, and shouldn't conflict with anything.




Theme © iAndrew 2016 - Forum software by © MyBB