Page 1 of 1
display_errors if variable
Posted: Sat Jan 10, 2009 10:55 pm
by matt1234
So what I'm trying to see if it's possible is having my php.ini file have display_errors off but to display them if a certain user is logged in. But then I guess, for instance, if session_start() isn't put into the file correctly, it won't even be able to tell if the person is logged in. Any suggestions, and is this even a possibility (besides putting code to show errors if the person is logged in into every page)?
Re: display_errors if variable
Posted: Sun Jan 11, 2009 5:08 am
by jaoudestudios
Try and use this...
Switch it on and off depending on the user.
Re: display_errors if variable
Posted: Sun Jan 11, 2009 5:01 pm
by kaisellgren
Or use set_error_handler() to use your own error handler function. Then accordingly in that function either display errors or not.
Re: display_errors if variable
Posted: Fri Jan 23, 2009 10:28 pm
by aschlosberg
The display_errors directive can be set at runtime: