PHP error reporting, or lack thereof..

Status
Not open for further replies.
I've followed all the rules on the site about enabling error reporting but all I get is blank pages every damn time an error happens. This is quintupling the amount of time it takes to track down PHP errors.

What's the deal with PHP? Why doesn't this report a single freaking error, ever:

error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);

I just want to temporarily set some pages back to the old days where the error was on line 1950 and it's a syntax error, etc...
 

Tornadus

Ars Scholae Palatinae
1,214
KrispyK":24rmy8r2 said:
I think you need
Code:
ini_set('display_errors', '1');

This, and for safe measure, what Blacken00100 said.

Code:
error_reporting(E_ALL);
ini_set('display_errors', true);
restore_error_handler();
restore_exception_handler();

If that doesn't work, then you probably have a PHP extension installed that is messing with debugging.

Maybe it's configured for remote debugging?
 
I've done all of the above. There's lots of posts out there on google about this, even specifying to dump to a local file over the traditional error log. I'm working on a friends website and he hosts it himself and of course he's on vacation and I can't even get cell reception to him. I have no idea where he's putting his error logs and I have limited access.

Thanks for the suggestions. Maybe it was just a bad day. I'll trigger his server to reset, give it a go again and report back!
 

Tornadus

Ars Scholae Palatinae
1,214
ominous":3a1etcrg said:
I've done all of the above. There's lots of posts out there on google about this, even specifying to dump to a local file over the traditional error log. I'm working on a friends website and he hosts it himself and of course he's on vacation and I can't even get cell reception to him. I have no idea where he's putting his error logs and I have limited access.

Thanks for the suggestions. Maybe it was just a bad day. I'll trigger his server to reset, give it a go again and report back!

What spryde said: http://us3.php.net/manual/en/errorfunc. ... .error-log

Code:
echo ini_get('error_log');
 
Like I mentioned, this is on a friends box and he's on vaca so I can't get at the logs, but phpinfo() does report it's logging. I stacked all the commands:

ini_set('display_errors', '1');
error_reporting(E_ALL);
ini_set('display_errors', true);
restore_error_handler();
restore_exception_handler();

At least I can see notices, but errors, true errors just white out the page still. If I just go in code and put "aisdashd9ahusdahsd" somewhere random, the page comes up white. If I get an unexpected brace, I get an error message and a line where the missing brace is thought to be. Not sure what the difference is, both are errors but only one shows up *shrug*.
 
Status
Not open for further replies.