Muting errors in PHP5
View Single Post
06-30-2008, 03:13 PM
Join Date: May 2008
Originally Posted by
Thanks for your reply. So supposing I didn't want to display any PHP errors on a production system (obviously) - I could use errr_reporting(E_ALL) to show them to logged in Administrators?
Thanks for this - didn't realise I was following a bad practise!
Personally... I turn error reporting completely off for production systems. Error reporting should be used for development purposes, then if anything should go amiss properly capture the error and display a generic 'error has occured' page.
Although only turning it on for administrators and not general users is a better idea then jut turning it on for everyone. Hackers and malicious users tend to look for these error messages to give them clues.
There are No Stupid Questions. But there a LOT of Inquisitive Idiots.
The Following User Says Thank You to drewbee For This Useful Post:
View Public Profile
Send a private message to drewbee
Find More Posts by drewbee