Error 500 (Internal server error 500): Full description, how to fix

+1 vote
Good day to you!
When visiting some pages on my website, error 500 occurs: 500 internal server error.
What does it mean? How can this error be fixed?
asked Nov 5, 2016 in System administration by Garry

1 Answer

0 votes

Good day!
You face error 500 (HTTP ERROR 500) in case, when an error occurred during processing an inquiry, but there is no additional information about this error. That is, it's an absolutely general error and can appear due to multiple reasons.

Error 500 in Google Chrome

In this article, I will tell you about the main reasons for error 500 occurrence and the ways to fix it.

HTTP Error 500 in Microsoft Edge

The first thing you need to do is to check your error log - the file error.log. There's quite a high chance that the reason and place where error 500 occurred will be described there.

Error in .htaccess file

In case you are using Apache web-server, the most probable reason for error 500 is an error in one of .htaccess files. Either you, or your scripts (for instance, installer of any of CMS) have changed .htaccess files and they are incorrect. Check all the .htaccess files by hand; after that you will require no Apache reload.

Error 500 due to an error in php code

Some web-servers are set not to show errors in php code and always return error 500 instead of it. Security-wise, it's absolutely correct and cause no special difficulties to a website owner. The real error can always be seen in your error.log. It's php code error that I've used to make error 500 for illustrating this article:

Error 500 due wrong PHP code

Errors due to slow script execution

Some scripts can operate extremely slowly. If it takes a script longer than a certain time period (usually, it's 30 seconds) to operate, web server causes its execution and returns error 500 to a user. In this case, the site administrator will see the following text in error.log file:

Fatal error: Maximum execution time of 30 seconds exceeded

Such an error usually occurs due to bad PHP code or to slowly operating database. Do your best to avoid using scripts from beginners or inexperienced programmers.

If you have any questions left or need more details - please, ask a question or leave a comment.

answered Nov 5, 2016 by Expert Brian (5,410 points)
Welcome to Help Desk, here you can ask any questions and receive answers from our experts and other members of the community.

If you have any questions, please do not hesitate to contact our help desk!

Make a question!