Status HTTP 500

Error 500 indicates that something has gone wrong, but what exactly - in this case it is difficult to say. It may be, for example, errors in the code, incorrectly set file permissions or something else. You have to do a small research to find out what exactly causes this error.


How to find the cause?

First of all, try enabling error reporting. This allows you to receive more information from the server.


For example, you can enable the error reporting in PrestaShop in the following way:


  • PrestaShop v1.4 - v1.5.2
    In the file /config.inc.php in the line 29 (or few lines up or down from that line), change the following string:
    @ini_set('display_errors', 'off');
    to:
    @ini_set('display_errors', 'on');
  • PrestaShop v1.5.3
    In the file /defines.inc.php in the line 28 (or few lines up or down from that line), change the following string:
    define('_PS_MODE_DEV_', false);
    to:
    define('_PS_MODE_DEV_', true);

After this go to the page where you have senn a 500 error - you will see a list of errors.


How to solve the problem?

After receiving a list of errors that could be the cause of a 500 error, we need to find out which of them are causing this error and fix them. Most often the causes of this error are:

Access privileges to files: Try to change the access privileges to files and folders from 777 to 755, and vice versa. Setting 777 is not recommended because it will allow even less experienced hackers to gain access to files and insert malicious code. In our hosting this risk is pretty low, since the hacker first would have to get access to the FTP account first.

Incorrect settings in the .htaccess file: in case of PrestaShop misconfiguration or embedded URL rewriting friendly URLs, even the slightest error in .htaccess can cause a 500 error. Before making any changes to this file do not forget to make a back up copy.

Modify the execution time of a script: Generally, this problem occurs when importing CSV files, backup, etc. In this case, ask how you can raise the max_execution_time limit for your account.

If after checking the above reasons you could not find the reason, check server logs and PHP logs. If you do not have VPS and your site is located on shared hosting, ask your hosting support team for help: {supportMail} or open a new ticket Panel (Panel -> "Support" -> "Create").



Soporte