best way to troubleshoot a php file... that displays nothing
I was trying to make a simple script that, when contacted by the paypal IPN server, sends an email to the person sending money that says basically thanks for donating. However, when I send a test message from the paypal IPN simulator, it says failed, status code 500 internal server error. I don't know how I can troubleshoot this, as for one, it uses post to send the data, not get, and two, even when I tried using get just to troubleshoot, it displayed absolutely nothing on the page.
Any help is appreciated.
Thanks,
-Michael.
3 Replies
Check the server error log next.
If you want to try grabbing the error at runtime, try adding this in your script near the top of the execution flow…
@ini_set('display_errors', 'On');
error_reporting(E_ALL);
Note that you'll get all notices, warnings, strict notices, deprec notices (if running PHP 5.3) when you do this. If that happens, it also means you've got some code to clean up.