[FX.php List] PHP Error Reporting...One more time

Leo R. Lundgren leo at finalresort.org
Wed Sep 3 14:08:05 MDT 2008


Interesting/good question :-)

I think it's fair to say that there are two major types of errors in  
PHP; The ones that raise warnings, notices and so on, but still let  
your application keep running even though the expected results of  
whatever it's doing may not be very,, expected. Then there are the  
kind of errors that stop the application from running, such as syntax  
errrors. These latter ones will hopefully not occur too often unless  
you're really doing it wrong or don't check your edits at all.

However, for the first type of errors, you could define your own  
error handler in PHP, that will be called whenever an error that  
you've configured it to handle occurs. For example, if there is an  
error that you deem not to be that serious, you could have the  
handler e-mail you the error notifications, and for serious errors  
you could handle it in a more graceful way than you would without   
global error handler. See http://se.php.net/manual/en/function.set- 
error-handler.php.

For the second type of errors there's not that much to do from inside  
PHP since your application may not start at all in such cases. These  
will have to be taken care of using your skillz ;-)


3 sep 2008 kl. 21.48 skrev Jonathan Schwartz:

> Like I said, the application here is making quick edits on working  
> scripts. One out-of-place character takes down the entire solution,  
> until discovered and repaired.
>
> Happens more often than I'd like to admit.
>
> Will look into ggt's response....
>
>
> J
>
>
>
>
> At 2:39 PM -0500 9/3/08, Bob Patin wrote:
>> I have a script for sending emails on FM errors, but I too would  
>> love to know about any PHP errors. However, once a page is  
>> properly written, it's not going to randomly generate PHP errors,  
>> so I'm wondering what the usefulness of this would be other than  
>> in the initial programming stage...
>>
>> From the peanut gallery,
>>
>> Bob Patin
>> Longterm Solutions
>> bob at longtermsolutions.com
>> 615-333-6858
>> http://www.longtermsolutions.com
>> iChat: bobpatin
>> AIM: longterm1954
>> FileMaker 9 Certified Developer
>> Member of FileMaker Business Alliance and FileMaker TechNet
>> --------------------------
>> FileMaker hosting and consulting for all versions of FileMaker
>> PHP * Full email services * Free DNS hosting * Colocation *  
>> Consulting
>>
>> On Sep 3, 2008, at 2:16 PM, Jonathan Schwartz wrote:
>>
>>> Hi folks,
>>>
>>> Occasionally, php syntax errors can result after performing on- 
>>> the-fly script edits for clients, and there just isn't time to  
>>> perform testing. Call me human. ;-)
>>>
>>> However, it is often the client that informs me of the error.   
>>> Hmmm...
>>>
>>> To resolve, I'd like to receive email notification for php  
>>> errors  on any page ( not FMP errors) and have a shot at finding  
>>> the error first.
>>>
>>> What mechanism can do that?
>>>
>>>
>>> Thx
>>>
>>> J
>>>
>>>
>>>
>>>
>>> --
>>> Jonathan Schwartz
>>> Exit 445 Group
>>> jonathan at exit445.com
>>> http://www.exit445.com
>>> 415-370-5011
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
> -- 
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-370-5011
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list


-|



More information about the FX.php_List mailing list