3

Possible Duplicate:
How to get useful error messages in PHP?

Simple errors in my scripts don't show on the screen, only in error.log. I can't find a way to display them on screen. What else can be done here?

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
  knaller!
?>

Using PHP Version 5.3.14-1~dotdeb.0

Community
  • 1
  • 1
MBaas
  • 7,248
  • 6
  • 44
  • 61
  • 1
    For parsing errors it's too late to enable error_reporting in the invalid script itself, since not even the first line will be run. PHP will abort before seeing the ini_set() or error_reporting(). PHP doesn't interpret scripts line-wise. – mario Jan 06 '13 at 15:02
  • in httpd.conf set `error_reporting = E_ALL | E_STRICT` and `display_errors = On` – nanobash Jan 06 '13 at 15:03
  • `Note`: Don't forget to restart apache service ... – nanobash Jan 06 '13 at 15:04

1 Answers1

1

Ok, I had used Search before but did not find the right answer, now it showed up as "Related"...

Here's the story:

  • Glavic, none of these suggestions changed anything.
  • the related article "cannot get PHP errors to display" had the solution to include the file in doubt in another file where error_reporting was set. And with marios comment I also understood why this helped.

That was quick - thanks guys! :)

Community
  • 1
  • 1
MBaas
  • 7,248
  • 6
  • 44
  • 61