I have a PayPal IPN file that doesn’t seem to work. It is very long so before I try to debug line by line, I’d like to know if there is a way in PHP to capture whatever error prevents the page from executing properly. I could then grab that and email it to myself. This would save me a lot of time.
I already tried a few things and know that the transaction is handled by PayPal properly and the IPN is sent to my IPN page. So, I’m sure that something got messed up in my code but it is almost impossible to debug it locally.
So my question is: Is there a way to capture the error that prevents the file from executing?
Thank you!
Turn on error logging in php.ini – you can have it log to a file, to the syslog, output to the screen etc.