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
https://forums.phpfreaks.com/topic/112726-php-error-handling/
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
https://forums.phpfreaks.com/topic/112726-php-error-handling/#findComment-579593
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.