0

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.

chiliNUT
  • 17,144
  • 11
  • 59
  • 92
  • Use the [scream](http://pecl.php.net/package/scream) extension, or a custom error handler; the simplest of cases `set_error_handler("var_dump");` – mario Sep 12 '13 at 20:08
  • That is glorious. I'll have to tweak it to get some prettier output but it works. Thanks alot. If you make it an answer I can accept and resolve this question. – chiliNUT Sep 12 '13 at 20:13
  • Just check PHPs error logs. – Justin Wood Sep 12 '13 at 20:34
  • @JustinWood I want error reporting in my browser, I do not want to have to go through the trouble of navigating to the log and grepping for my script name, etc. writing a custom error handler has solved my issue. – chiliNUT Sep 12 '13 at 20:35

0 Answers0