Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@******.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
It is important to mention that this is a very general error message and may occurs in many cases — in most of them it is not exactly a server related issue. Actually, it is better to be understood like a report for something that has gone wrong, however, the server could not be more specific on what exactly has caused the problem you are experiencing.
Still, this error is on the server side not on your local computer. However, there are several things that you can check and hopefully you will be able to resolve this problem alone.
You can start from simply refresh your page with F5 or retype your address in the address bar of your browser. Very often this error may be caused by a temporary load on your host server if any process or query (MySQL, PHP and etc.) has used a high percent of its resources.
If the error persist it would be a good idea to check the error log for any strange records. A very common reason for this error is a permissions issue. Due to the fact that most Linux Host apache web server runs php as a cgi and has suexec enabled the maximum allowed permissions of your scripts is: 755 ( rwxr-xr-x ). If your hosting server is with cPanel control pane you can check your cPanel -> error log. If you see an error like:
error: directory is writable by others: (/home/user/public_htm/any-path)
error: file is writable by others: (/home/user/public_html/any-path)
You can be sure that your issue is caused by the fact that your file/directory has permissions higher than 755. You should not be worried due to the fact that you can always access your files via a FTP client and change your permissions to the maximum allowed on the server where your scripts are located.
Another common error message that can be seen in your error log is:
[Fri May DD HH:MM: YYYY] [error] [client xxx.xx.xx.xx] Premature end of script headers: /home/user/public_html/my/index.php
In this scenario the reason for your issue may be caused by several reasons. If the server is currently loaded the index.php may not be able to be executed on the server which as a result generate a “premature end of script header” error. In such case it recommended to make sure that all the content on the page in question that is loaded from a remote host can be properly access from your host. You may also check for any loop mysql queries or any scripts that can not be fully executed for some reason.
You may also check if your .htaccess file does not contain any invalid directives, flags or rewrite engine statements. This also can be checked under the error log of your account.
If all the above does not help you to resolve your issue, you should contact your host support team for more information regarding the case.
Good luck :)