How to retrieve and/or display php errors in a script which has been included with the @ error suppressor

39 views Asked by At

In my development environment, all php pages are executed from a site controller. It renders headers and many other skeletal functions, and then to display your requested page, it does a

@require_once('mypage.php');

because of the "@", no errors are reported, no matter what I set the reporting to. Inside of mypage.php, I have this

ini_set('display_errors', 'On');
error_reporting(-1);

and it does absolutely nothing. I cannot remove the "@" error suppressor, I have no control over that. I understand that display errors won't show anything since they are being suppressed.

When one of my scripts errors out, the page will just stop rendering anything past the error, or will not load at all, or white screen of death, or a variety of other things depending on the nature of the error.

I am wondering, is there some sort of php global object that has the errors? so I could do something to the effect of:

foreach($_GLOBALERROROBJECT as $error)
{
echo $error;
}

I have done some searching and everywhere it just says to use ini_set which has no effect. I know my server is ok with using ini_set since I have successfully used it for other things.

Any help or suggestions would be greatly appreciated.

0

There are 0 answers