Page 1 of 1

PHP Show Errors (win2k, IIS5) and more..

Posted: Fri Aug 29, 2003 1:55 pm
by ginoitalo
Currently when I have a php error I get no error message, page exec just halts, I was wondering what is the trick to get it to spit out the errors to the browser ?

also

Is there a PHP equivalent 'try...catch' or 'on error resume ...' ?

Is there a smart way, to if ever there was an error to occur on a web site it would log it in a DB or file ?


Thanks for the time.

Posted: Fri Aug 29, 2003 2:54 pm
by liljester
in your php.ini file set the display_errors = On

Posted: Fri Aug 29, 2003 3:41 pm
by edg
You might also want to change the error_reporting so that warnings that are non-critical don't show up.

edg

Posted: Fri Aug 29, 2003 7:19 pm
by McGruff
edg wrote:You might also want to change the error_reporting so that warnings that are non-critical don't show up.

edg
It's not a good idea to turn error reporting down a notch or two when you're developing. Should always develop with E_ALL.

Posted: Fri Aug 29, 2003 8:03 pm
by JAM
Recommended: http://se.php.net/manual/en/ref.errorfunc.php
Changing the error_reporting will (if wanted) produce the same results as VB(A)'s on error resume next, but as McGruff mentioned; You shouldn't.
Take the opportunity to learn from the error... ;)