Fixing Error 500

This page was written in English, please see the English version for the correct code changes.

Error 500 is a generic error that your host generates.

There are many reasons why it can occur, but the 3 most common ones are:

1) File / Folder Permissions - Most modern hosts (that offer cPanel) will block PHP files that are set to 777 or that are in a folder that is set to 777, or even if one of the parent folders is 777.

Instead of running the file, your host will show the error 500. The reason for it is server security- when a file is set to 777, anyone can change it and plant malicious code in there.

You may ask yourself "Why do the Prestashop installation instructions say to use 777"? Well, it seems that 777 in French translates to 755 in English :)

We did ask them to modify the instructions but for whatever reason, our request was overlooked. Some very old server configuration or ones that are not properly configured won't work properly with 755 and require 777, but it seems that they are very few (since it's a major security risk).

No files or folders should be set to 777, 755 should be the maximum permissions setting.

2) Server timeout - Every server has a timeout setting, which is the time that a script is allowed to run.

These limits vary from host to host; some set it as low as 30 seconds and don't allow you to change it, and others set it to 5-10 minutes and let you change it.

If you run a script that requires a long time to finish (thumbnail regeneration, import/export, or backup) and it reaches the timeout setting, an error 500 page will be displayed.

You should contact your host and inquire about increasing the timeout limit.

3) Incorrect syntax in .htaccess file - The syntax in the .htaccess file is very strict, if you add an incorrect command, or even an incorrect character, your server will return error 500.

Try removing the .htaccess file, to make sure it is that cause, and then recreate it from Prestashop (Keep a backup of the original .htaccess in case your host had some required variables in there).

If you are still getting an error 500 and you are sure it's not caused by the problems above, you will have to look in your host's error log to get the details of the error. Most hosts will have an "Error log" link in the cPanel- look it up there and see what the cause of it is.