Display Errors Off -> set_error_handler()
Moderator: General Moderators
- seodevhead
- Forum Regular
- Posts: 705
- Joined: Sat Oct 08, 2005 8:18 pm
- Location: Windermere, FL
Display Errors Off -> set_error_handler()
If in php.ini, Display_Errors is set to 'OFF' and you use the set_error_handler() function in your script and supply a error handling function... do the errors display? Ideally I would like to have display_errors turned off always and override it with a switch using set_error_handler('myerrorfunction');. Thanks for your help.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- seodevhead
- Forum Regular
- Posts: 705
- Joined: Sat Oct 08, 2005 8:18 pm
- Location: Windermere, FL
1) I have the error handling function with set_error_handler() implemented, but I do not have display_errors set to OFF yet. Because I do not know how to access php.ini, I thought I would find out if I even can do this at all before opening up another can of worms.
2) I did a couple searches and did not find an answer.
3) I can't believe you want to "filter" questions -- like this one, which is most obviously valid and on-topic. Hopefully someone can lend me a helping hand on this legitimate question as a fellow developer.
2) I did a couple searches and did not find an answer.
3) I can't believe you want to "filter" questions -- like this one, which is most obviously valid and on-topic. Hopefully someone can lend me a helping hand on this legitimate question as a fellow developer.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
We filter out questions the questions that should have be atleast attempted in the first place. Not to sound unhelpful, but it is not our place here to promote users to ask first then try it for themselves later.. that simply isn't fair to us who donate our time when the user could have tried it himself.
To answer your question -- your custom error handler will still be executed.
To answer your question -- your custom error handler will still be executed.
- seodevhead
- Forum Regular
- Posts: 705
- Joined: Sat Oct 08, 2005 8:18 pm
- Location: Windermere, FL
Hey Jcart... no problem at all.. I completely understand. I would hope that all posters take it upon themselves to put forth an attempt to solve their problems before handing them off to more experienced developers. But I would also hope that all posters, whether in the asking or answering categories, feel welcome to post as such. Thanks for the answer on the question. Looks like it will be best for me to just turn display_errors to OFF in the php.ini and use my error_handler() function for my scripts. Thanks again.
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US