500 Internal Server Error for php file not for html
apache, html, internal-server-error, php
Solution
500 Internal Server Error is shown if your php code has fatal errors but error displaying is switched off. You may try this to see the error itself instead of 500 error page:
In your php file:
ini_set('display_errors', 1);
In .htaccess file:
php_flag display_errors 1
Problem
My site having 4-5 static pages only. index.html & index.php both are there. index.html is working fine. If I change to index.php, it's giving `500 Internal Server Error`. I don't know where is my mistake? Note: If I use .htaccess file with `php_flag display_errors 1`, It's showing `Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.` If I use .htaccess file with `empty`, It's showing `Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.` And if I give `../contact-us.php`, it's showing correctly. Thanks...