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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ginoitalo
Forum Newbie
Posts: 4
Joined: Fri Aug 29, 2003 1:55 pm

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

Post 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.
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Post by liljester »

in your php.ini file set the display_errors = On
edg
Forum Newbie
Posts: 11
Joined: Wed Aug 28, 2002 12:58 pm

Post by edg »

You might also want to change the error_reporting so that warnings that are non-critical don't show up.

edg
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post 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.
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post 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... ;)
Post Reply