If your site is in development
Set the proper error reporting for your PHP interpreter:
- set the
error_reportingto a high level (I recommend
E_ALL | E_STRICT).
If your site is already serving customers
You just can follow the advice above: it is fast and useful way to diagnose PHP errors.
But sometimes a error message can contain some sensitive information, so you could be not willing to show it to an arbitrary visitor.
In this case you can see an error message in the PHP error log.