If your site is in development
Set the proper error reporting for your PHP interpreter:
- enable
display_errors
PHP option - set the
error_reporting
to a high level (I recommendE_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.