PHP not displaying errors?
6 answers
500 Internal Server Error is usually caused by a problem in your Apache config files. This usually has nothing to do with your actual PHP script. For example your .htaccess file. Check your server logs, and if you can, post bugs here as part of your question so we can better assess what your exact problem is.
+1
a source to share
The following test script will also not generate error messages / logs.
<?php
header($_SERVER['SERVER_PROTOCOL'].' 500 Internal server error');
echo 'Something went gaga';
?>
However, access_log will display the response code "500" (assuming the default apache access parameters are set).
Find the code for "HTTP / 1.1 500", "500" or "header (" and add:
trigger_error('Peep', E_USER_NOTICE); // or error_log()
This will create an entry in the error log (with filename and line numbers)
0
a source to share