Dealing With Internal Server Errors

internal server error

500 Internal Server Error is a common scenario and countless people come across this error quite frequently, but unfortunately, don't know how to deal with it. Basically, this error pops up whenever the server encounters an unexpected condition. It is a "catch-all" error that is displayed when the information available is too little to describe what actually happened. The most popular reason could be a configuration issue in the application, or lack of sufficient permissions could be causing the problem.

Back It Up Before It's Too Late

Before you try to fix an internal server error, you need to perform a complete backup of your files and folders, so that you may restore things to just the same condition, in case anything goes wrong.

You can try to perform the following steps to fix an Internal Server Error:

  1. Download an FTP client.
  2. Enter your cPanel username, password, and Hostname and click the quick connect button.  Note: In a few cases, your ISP may provide you a configuration file, which can be used to auto-configure the FTP client. In this case, you can choose the appropriate config file for the specific FTP client.
  3. Once you're in the home directory click on the public_html folder, which contains all the basic files that run your website.
  4. Locate the .htaccess file, and when you double-click, the file appears in your local directory. Let it remain there until all of these steps have been completed. Next, right-click the .htaccess on your server and rename it to ".htaccess1"
  5. Hit the Refresh button, and see if your website is alright now. If it is, then it was a problem with the .htaccess file. You may need to contact your developers and get them to work on the faulty .htaccess file to fix the issue.
  6. If it still doesn't work, try renaming the folder that contains the .htaccess file. If there are still any issues, the problem may be with permissions. Change the permissions for the folder to 755 and check the option that allows recursion into subdirectories. If the error is not yet fixed, sign into your cPanel and make changes to the PHP configuration by explicitly mentioning the version number; otherwise, try using EasyApache to recompile Apache and PHP from scratch.
  1. If the issue persists, you may then have to raise a ticket with cPanel or post in forums to seek help and try to follow the instructions to resolve the issue.

Understanding the Root Cause of the Problem

  • To find out the exact cause of the error, log into cPanel and click on error logs under the logs section. This will provide you with a detailed description of the error including the files/folders affected.
  • If you are using a Linux system the logs would be located at -
  • /usr/local/apache/logs/error_log
  • /usr/local/apache/logs/suphp.log
  • The cause of internal server errors could differ from one case to another, but these steps could certainly help in most of the cases. If you're unable to debug the problem on your own, managed hosting services could come to your aid.