How can i trigger 500 Internal Server Error or 404 Page Not Found Apache errors in PHP?
For 500 Internal Server Error i have tried
I'm probably quite late, but this solution should work
header("HTTP/1.0 500 Internal Server Error");
include("/path-to-public-html/errors/500.php");
die();
This will trigger a 500 ISE response, and show the default 500 error page, then stop the script. Obviously you will need to to modify the location of the included file