fix error 500 prestashop

Prestashop 500 Error: How can we Fix Error 500 in PrestaShop?

Do you get any error named “500 error” during the installation of Prestashop or blank pages appear with the error Prestashop 500 error or any error 500 Prestashop, then this article is for you. With this guide, you will learn how to detect and solve Prestashop 500 error, an internal failure of the webserver. This kind of error occurs, especially when you start updating your site or module from a Prestashop store. When installing the module / or updating the site, it starts processing the configuration, so that time error occurs if something wrong happens. 

Prestashop 500 error

The 500 error is a problem that appears if there is an internal server failure because it cannot process the request. There is nothing to be panic about if Prestashop 500 error appears because it has the solution. The most common Prestashop 500 error is seen below: 

  1. Internal Server Error
  2. HTTP ERROR 500
  3. Error 500 (Internal Server Error)
  4. HTTP Error 500
  5. 500 Error

Common causes of that error happen:

  1. File / Folder Permission is wrong
  2. Wrong configuration of the .htaccess file
  3. Server timeout
  4. Low PHP memory
  5. PHP modules missing
  6. Backdated / Obsolete modules

What is Prestashop 500 error?

As we have explained before, although its name indicates that it is a server error, it is an error produced by an instruction that the server is not able to interpret, at the same time it can affect the robots (search engines) that reach a URL Without the information that should be found, it produces a rebound effect that logically in addition to affecting our audience will affect our organic positioning.

Where does the 500 error come from?

As we said, Prestashop 500 error is an internal server failure that appears when executing a request. It is neither more nor less than a message that warns that something is failing and not working as it should (on the webserver). Let’s not confuse terms because the 404 error, which is also very common, is due to a landing page that is no longer available or does not exist.

The disadvantage of this failure is that it can have several causes, so it is a bit difficult to find a suitable solution the first time and much more to get rid of it forever … what is certain is that it can be due to the following factors:

Waiting time. Servers have timeouts that determine how long a script that imports, exports, translates, or uploads backups runs for. If this limit is exceeded, it is usually 30 seconds, then the dreaded error 500 will appear.

.htaccess . If you have misconfigured this file then this bug appears. In fact, the misuse of friendly URLs causes internal problems in the webserver or if we have written the code wrong in .htaccess logically it leads us to have 500.

Folder permission. The 777 permission has a large number of weak points so it can corrupt the contents of the files in our folders and thus turn the good internal functioning of the server into a failure.

Programming error. It is usually the most common, a wrongly programmed line or one that conflicts with another store process is usually the most normal, when installing a module in Prestashop it usually happens very often.

Types of 500 internal server error

The types of Prestashop 500 error  classified into several types, generally each of them indicates a specific problem that will give us a clue of where we will have to look or how to solve the problem, all errors have the 5xx format, that is, within 500 several may appear that we indicate below:

Error 510: Not extendedUsually, it is a server problem, it is old, it has an internal failure, it has a virus, or it may even be that the server administrator has denied access, contact your provider.

How can we fix Prestashop 500 error?

Error 500 has no clue why it is happening. But each website has an error log. So we can observe the error log to find out the actual error. To enable the error log, we have to enable the debug mode. So let’s see how to enable debug mode for Prestashop. We must first have activated error reports of Prestashop when we surf the front-office and back-office, in our case our Prestashop store so check and locate the error safely, also known in Prestashop as debug mode or display mistakes.

Enable debug mode

If you have access to the admin panel ( back office ), then login in and CONFIGURE menu under Advanced Parameters > Performance > Debug Mode > Yes 

If you don’t have access and you have the most recent versions of Prestashop ranging from 1.5.3 to 1.7 you have to perform these steps:

  1. Go to config / defines.inc.php
  2. Find the line of code (‘_PS_MODE_DEV_’, false);
  3. Replace it with (‘_PS_MODE_DEV_’, true);

If instead, you continue with previous versions of Prestashop, peace of mind, follow these steps:

  1. Go to config / config.inc.php
  2. Find the line of code @ini_set(‘display_errors’, ‘off’);
  3. Replace it with @ini_set(‘display_errors’, ‘on’);

By activating the errors, we can exactly locate the root of the problem and know why it occurred, and take the reins to solve it, it will show us the lines of code where the problem is found in the case that it is due to some code. Go for the 500 error! The best thing is to prevent this, the best thing is to regularly review the error log that our server has, there is a file generally in txt format that indicates all those errors, with which we anticipate possible problems with the client If your server has CPANEL, for example, you have a log only for these errors.

As you can see, we can independently see the most common errors of a Prestashop 500 error, if your panel is Plesk or another, it is similar, all servers have help.

The solution to HTTP 500 bug

Your error may not come from the aforementioned causes, no problem since you now have more information with which to address the problem. After having made the pertinent diagnosis, we propose the following solutions based on the cause that caused it:

The Prestashop 500 error is due to the waiting time: We will have to increase that time for the scripts to run smoothly. If you have a service provider, you should contact him, change the parameter, and voilà ! Or optimize the source code so as not to overload the server.

The fault arises from htaccess: First of all, make a backup copy of the .htaccess file, then deactivate the friendly URLs or even regenerate the httacces, by default if you deactivate the friendly urls in Prestashop it will be regenerated automatically.

The code 500 is in the permission of the folders: Change the permission from 777 to 755 or 644. Sometimes we may have changed the permissions of a folder and that is why it has given us an error, Prestashop is very picky about the issue of security permissions.

Low PHP memory Limit: For Low PHP memory limit, the following errors occur: 

  • Fatal error: Allowed memory size
  • Error 500 during a large order
  • Prestashop hangs when saving email translation

This kind of error happens due to a low PHP memory limit. In that case, we have to increase the PHP memory limit. Many websites default memory allocation 32 MB, 64MB, 128 MB. But Prestashop System requires a memory_limit minimum of 256M. 

To increase the PHP memory limit, log in to your hosting, go to yoursite_file, edit php.ini, and one new window will open. Increase the memory limit to 256M.

Missing PHP modules: When a site runs in a VPS, it’s usually found that PHP misses the required module. We need the following module to run the Prestashop site. 

  • OpenSSL
  • Mcrypt
  • Curl
  • Zip
  • GD
  • PDO

Backdated / Obsolete modules: When you update the Prestashop version, you may face error modules that are incompatible with the new version of Prestashop. It can generate Prestashop 500 error. So you have to review all the Addon you have installed. It’s recommended to install the software from the Prestashop marketplace. There is always up-to-date software available.

Is the Prestashop 500 error not fixed? What now?  

If the Prestashop 500 error is not fixed, then don’t worry. We are here to resolve the issue. Our Prestashop expert will fix the issue. It will take a shorter time to log the problem and fix the issue. If you feel any issues to apply the above process, feel free to explore our PrestaShop Development Services.

Read More:

How to enable SSL on prestashop

Share :

Share Your Valuable Opinions

Join The Ride

Subscribe to our newsletter with stories from our latest prestashop tutorial and the best tips & Tricks

Articles You may also like