displaying errors

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


php_info(); for display_errors variable says: Off, Off. I tried the
error_reporting(E_ALL);, but nothing happens. If I have an error
somewhere, PHP just silently dies, no output whatsoever. Which variable
has to be set so that error_reporting() function works, but no
errors/warnings are displayed if the error_reporting() wasn't executed
(admins don't want to have display_errors On globally)? PHP Version is

"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"

Re: displaying errors

By setting the display_errors directive.

ini_set('display_errors', 1);

Of course a fatal error, such as a parse error, will still be silent as
the code will never execute (hence the setting of display errors at
runtime won't execute) but other errors will show up. Also consider
setting it with .htaccess and/or simply ask the admin where the PHP
errors are logged and read that log (this is preferred anyways...)

Re: displaying errors

Nikola Skoric wrote:
Quoted text here. Click to load it


I've seen this when I had a syntax error in my PHP.  Rather than
detecting the error, PHP silently crashes.

First, check your php.log file to see if there's anything there.
Sometimes I've seen things there that aren't displayed.  If not, try
commenting out blocks of code until you get *something*.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline