Jump to content

PHP Error handling


prime

Recommended Posts

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?

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.