To determine the reason why the 500 error occurs, look at the logs. Perhaps there is an entry in the error.log file indicating the cause of the problem. Consider the most common options.
Lack of resources
If the reason is this, the problem is solved very simply - contact the hosting-
provider requesting increased resources.
The presence of inoperative scripts or limited time for their execution.
If during a certain period of time, which is often a minute, the server cannot process the scripts, then a 500
Internal Server Error appears
.Also, webmasters may encounter a similar error if they run a CGI script from under Apache, if the time specified in the server settings is not enough to execute the script.
If the scripts previously worked, and problems appeared, for example, when moving to another hosting, the problem may be caused by other reasons. For example, the fact that the server blocks requests.
Errors in setting permissions
The rights to the files must be equal to 444 or 644. CHMOD for folders should not differ from 755, that is, only the owner of the resource can view them. Access rights to scripts should be indicated as 600. Otherwise, the server, for security reasons, blocks access to the script, even if it is operational.
If the cause of the 500 error is the reason, use the FTP manager to change the permissions. Filezilla does a great job with these features.
.Htaccess file contains unsupported directives
Check if the .htaccess file is present in the root of the site, or elsewhere. If there is one, open it using any text editor. You can use Notepad.
Error 500 may occur if you are using a server running suPHP, i.e. supporting php.ini. If there are directives in the .htaccess file that change the parameters of the PHP environment, problems may arise. The most common directives are php_admin_flag, php_flag and php_value.
Often, global variables - Register Globals - are included as instructions.
This problem is solved very simply - unwanted parameters can simply be deleted. Another option is to comment them out by adding the # sign to the beginning of the line. There should be a space between the grid and the directive name.
If you definitely need to execute the commented parameters, you can write them in the php.ini file. In this case, you do not need to use php_admin_flag, php_flag and php_value - just designate them according to the principle: "name of the required parameter = On".
Fatal PHP error
Such a problem may occur if PHP operates on the principle of CGI. In this case, you need to carefully check the program code, diagnose and
fix errors. Please note that line endings of CGI scripts should not be in Windows format (\ r \ n), but should be indicated in UNIX format (\ n).
If none of the proposed solutions fix the error, contact your hoster. Explain in detail to him when and after what actions error 500 appeared. Ask for the cause of the problem and help resolve it. In case the hoster is not able to find out why the http 500 Internal Server Error occurred , contact the CMS support service that you are using. Be sure to include all details in the letter, including - comments of the hosting provider regarding your situation.