I am getting Internal Server Error (500)

This error is generalized when there is a problem the server cannot process a request to the site you are on. At the same time, the browser cannot tell exactly what went wrong.
It can arise for many reasons. Let's take a look at the most common ones.

1. Invalid entry in the .htaccess file
Check the file configuration, make sure the syntax is correct, try commenting out some of the settings. If no problems are found here, then add the following entry at the beginning of .htaccess:
php_flag display_errors 1
This will enable advanced PHP error reporting to help us further.

2. Incorrect PHP syntax
By enabling the extended PHP error output, we find out what the problem is. Most often it consists in the incorrect spelling of PHP syntax.

3. Invalid rights to folders or files
Set permissions to 755 for folders and 644 for files.

4. PHP timeout
If your PHP script is trying to create a lot of external connections, this can cause a timeout and in turn cause a 500 error. You may need to add some kind of timeout rules to your script. Try to search for a solution to the problem in Google by specifying the query "script name + internal server error"

  • 45 Users Found This Useful
Was this answer helpful?

Related Articles

Error 502 Bad Gateway nginx and why does it occur?

If this error occurs, then HTTP requests from clients to your site are going through some kind of...

I see question marks and incomprehensible symbols on the site

If incomprehensible characters are displayed on your site, this is due to incorrect encoding of...

Help, the cron is not working

If you run a job through PHP, for example php -f /home/username/public_html/file.php and you...

Help, Adsense is not showing

If your ad is not showing, please make sure you paste the code between the "body" tags. If you...

I see HTTP code 200 when debugging a site

If you see a '200 OK' code while debugging your site, it means that your site is working fine....