prime Posted July 1, 2008 Share Posted July 1, 2008 I have one question regarding designing custom error handling. I have tried creating a bunch of custom error handling scripts, but they haven't been able to pick up on syntax errors for some reason. I.E the syntax error stills gets printed to the screen and not emailed. Can anyone point me to a good tutorial on custom error handling? Quote Link to comment https://forums.phpfreaks.com/topic/112726-php-error-handling/ Share on other sites More sharing options...
TheBigRedStapler Posted July 1, 2008 Share Posted July 1, 2008 The easiest way IMO would be apache, but I'm sure it's possible to capture the error in PHP.. What's the code you've been trying and what are the errors your getting? Quote Link to comment https://forums.phpfreaks.com/topic/112726-php-error-handling/#findComment-578900 Share on other sites More sharing options...
prime Posted July 1, 2008 Author Share Posted July 1, 2008 I don't think I have I have that script anymore I changed my desktop os from Windows to Linux (got sick of some repeating problems). I figured I'd try and see if I could find a couple of good tutorials before I try again Quote Link to comment https://forums.phpfreaks.com/topic/112726-php-error-handling/#findComment-578903 Share on other sites More sharing options...
prime Posted July 1, 2008 Author Share Posted July 1, 2008 Anyone know where to find a good tutorial for this? Quote Link to comment https://forums.phpfreaks.com/topic/112726-php-error-handling/#findComment-579579 Share on other sites More sharing options...
DarkWater Posted July 1, 2008 Share Posted July 1, 2008 Create an error handling function and just set it with set_error_handler(). Quote Link to comment https://forums.phpfreaks.com/topic/112726-php-error-handling/#findComment-579583 Share on other sites More sharing options...
PFMaBiSmAd Posted July 1, 2008 Share Posted July 1, 2008 Php syntax errors are detected during the parse phase. Since the script never gets executed, nothing you do in the script will have any effect. Unless you have a situation where the php code itself is getting dynamically entered or dynamically generated, any parse errors should have been eliminated long before your code was put onto a public server. If you are using eval(), I believe (but have never tried) that you could have a custom error handler be executed on fatal parse errors. Please describe what your exact problem is to get specific help with it. Quote Link to comment https://forums.phpfreaks.com/topic/112726-php-error-handling/#findComment-579593 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.