ComputersSecurity

Error Internal Server Error: what is it and how to deal with it

Quite often owners of hosting services suffer because of constant error message 500 (Internal Server Error). She, as it is called, simply poison lives. Now we will try to understand the essence of the situation briefly and see how it is possible to get rid of the appearance of a mistake in the future.

Error Internal Server Error: what is it?

So, let's start, perhaps, from the very meaning of this phrase. In the Windows error directory (and not only), there is an error number 500 that corresponds to the computer term Internal Server Error. Translation of this phrase means an internal server error related to the status of the HTTP protocol.

In fact, the error means that the server software either does not work or works, but one or more of its components fail to respond to client requests, for example, a search engine or an Internet browser.

Causes of error

Talking about the error Internal Server Error in the broadest sense, it is worth considering that it can occur on a lot of sites or resources written with completely different CMS. Here, by the way, you need to distinguish the reasons for its occurrence.

Very often such a situation can occur on sites such as WordPress, OpenCart, Joomla, etc. If control structures like WordPress are not used when building a site, perhaps the reason lies in the fact that the hosting itself fails when connecting incorrect PHP extensions , Or the site after the request returns invalid HTTP headers that can not be recognized by your server.

No less common cause of the error Internal Server Error can be called the lack of correct access rights. So, for example, if PHP files of scripts that are hosted have access rights of 777, it may very well be that their execution is simply blocked by the server, resulting in an error message.

Also one of the reasons can be long enough work of scripts. The fact is that PHP-time constraints are not only valid for hosting, similar limits can be imposed on the server side. In other words, this somewhat resembles the time-out of the operation. When the server does not receive a response to the request within a certain time, it simply blocks the execution of the script.

In some cases, the Internal Server Error error may occur when the hosting exceeds the memory limit. Simply put, the script for execution requires more than the required one, and in fact such a limit is set not only in PHP, there are often restrictions on the consumption of resources by all executable scripts.

Finally, one of the most common situations for the Internal Server Error error is the content of the incorrect directives in the .htaccess file (by the way, this is most often seen when working with the WordPress engine). Now we are close to finding a solution for each specific situation.

Error Internal Server Error: how to fix the simplest ways

First of all, let's see what can be done if there are incorrect access rights. In this case , permissions 777 allow you to edit the contents of absolutely everything, which, of course, affects security. In such a situation, you need to change them by applying 755 to the folders, 600 to the script files, and 644 to all the steel data files.

If the executable script is too long, you can try to increase the timeout, however, there is one catch. Such a solution can work on a dedicated server or VPS (Virtual Private Server), and in the case of virtual hosting there will be no effect.

As for the overestimated consumption of memory in comparison with the restrictions that apply to hosting, here you can advise only to contact the support service or simply change the hosting provider itself, whose restrictions will not be so stringent.

Now a few words about the .htaccess file. The fact is that it assumes the use of very strict syntax, if errors or some inaccuracies were made during the settings, the Internal Server Error can not be avoided. Here it is necessary to proceed as follows. First, you need to check the presence of the file in the root directory of the site, then completely and completely by making a backup copy of it. If after this procedure the site becomes operational again, then the problem is in the .htaccess file, which will have to be checked for errors in the syntax.

Problems with the WordPress engine

With WordPress, things are worse. The fact is that this engine is able to rewrite the original .htaccess file, which is responsible for managing access to files and folders of the hosting, and after all the original file should be created only once, and certainly not in WordPress!

The easiest way to fix this situation is to disable the WordPress theme and use any other instead. If the error has disappeared, it is the topic itself, if not - you need to disconnect WordPress plug-ins step-by-step and check which one affects the performance.

In some cases, you may need to update WordPress to the latest version and turn off the file overwrite function. First, download the original .htaccess file to the computer terminal, then enter the site in the folder by the path / wp-admin / includes / with the subsequent download of the file Misc.php, which you need to open, say, in the standard Notepad (or any other text editor) and find the function's "function save_mod_rewrite_rules" function string. Now, in the function itself, go to the line "return insert_with_markers ($ htaccess_file, 'WordPress', $ rules);" and replace it with "return true;" (of course, all commands are written without quotes). It remains only to save the changes and upload a new file to the hosting with the replacement of the old file misc.php.

The disadvantage of this method is only that in this case the WordPress update is disabled. When connecting plug-ins, they naturally will not work.

Conclusion

In principle, these are, so to speak, the most common causes of the error and the methods for eliminating it. In fact, there are a lot of reasons why there are so many ways to deal with such situations, so you have to analyze the situation in each specific case, and only then choose which method to correct the error .

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.unansea.com. Theme powered by WordPress.