CityHost.UA
Help and support

Error 500 "Internal Server Error"

This error occurs in case of incorrect operation of your scripts, or incorrect settings of the .htaccess file.

 

It is impossible to consider all possible causes of this error, so we will consider the main ones:

 

1. Incorrect or unavailable directives are used in the .htaccess file. Check the content of .htaccess for full syntax compliance. View the error log (error.log), which is available in the FTP logs folder.

For example, in the error log:

[DD MM xx hh: mm: ss yyyy] [alert] [client xx.xx.xx.xx] /var/www/username/www/Your_domain/.htaccess: Invalid command "php_value ', perhaps misspelled or defined by a module not included in the server configuration

 

php_value is a mod_php directive that is not available on the server. If you open the file www / your_domain / .htaccess in your account, you will see lines with the problematic directive, for example:

php_value magic_quotes_gpc 0

To eliminate this problem, you need to delete the line or comment it out using the "#" symbol:

# Php_value magic_quotes_gpc 0

 

A similar situation when using php_flag:

[DD MM xx hh: mm: ss yyyy] [alert] [client xx.xx.xx.xx] /var/www/username/www/Your_domain/.htaccess: Invalid command php_flag ', perhaps misspelled or defined by a module not included in the server configuration

It is necessary to open /www/Your_domain/.htaccess and delete or comment out the lines containing this directive, for example:

#php_flag zlib.output_compression 1

 

You should also be careful with the Options MultiViews and SymLinksIfOwnerMatch directives.

MultiViews - can cause the server to return non-existent site pages. In cases of accessing a non-existent page or section, an attempt will be made to find a folder or file with a similar name and return it instead of the requested one.

SymLinksIfOwnerMatch - allows the web server to use symlinks only if the owner of the file or directory pointed to by this link matches the owner of the specified directory. If this condition is not met, your scripts will not work correctly. Also, this directive creates a heavy load on the server due to additional system requests.

 

2. Incorrect operation of the script. Perhaps it uses unavailable functions, or simply the script has incorrect syntax or was corrupted when uploaded to the server. Check the correctness of the syntax. If the script uses includes, check that they and the directories containing them are readable. Check the error log /logs/your_domain.error.log to determine the exact cause.

 

3. Perhaps your scripts use outgoing connections (these can be scripts of affiliate programs, counters, etc.), which do not have time to work on the side of a third-party server.

If, after checking your scripts, you were unable to determine the cause of error 500 - write to us, indicating the period of time when you observed this error, and we will help you determine the reason why this error occurs.


Similar articles