Wondering how to fix PrestaShop back office error 500 or blank page. We can help you.
Generally, the error occurs when we access the Back-office while Debug mode is active or while production mode active. The characteristic of this error is that it only occurs in one of the modes and not in both.
Here at Bobcares, we handle requests from our customers using Prestashop to fix similar issues as a part of Server Management Services.
Today, let us see how our Support techs resolve this issue for our customers.
What causes PrestaShop back office error 500 or blank page
Usually, this error is seen in PrestaShop Stores Version 1.7 and that makes it impossible for us to enter the Back-office, showing an error 500 or the page goes blank.
Following are some of the most common error messages seen:
1. “Error 500 (Internal Server Error)”
2. “Error 500 – Internal server error”
3. “Internal server error”
4. “HTTP ERROR 500”
5. “Error 500”
6. “HTTP Error 500”
Common causes for this error are given below:
1. Permission error
2. Incorrect configuration of the .htaccess file
3. Waiting time has expired
4. Obsolete modules
How to detect this 500 error
In PrestaShop 1.7 stores, unlike version 1.6, a series of cache files are created located in two “prod” (production mode) and “dev” (Debug mode) folders, depending on the PrestaShop mode being used.
These cache files help to speed up PrestaShop in each of the chosen modes.
We can find these files in the following two directories depending on the Version of PrestaShop:
/app/cache/
/var/cache/
If a programming code error exists, it will be written to the cache files corresponding to the mode that is currently being used.
General troubleshooting
We can activate our web host’s FTP or CPanel error reports in the PrestaShop shop.
There are 2 ways to enable these reports, depending on the version we are using:
PrestaShop v1.4 to v1.5.2
1. Firstly, open config/config.inc.php
2. And find the line: @ini_set(‘display_errors’,’off’);
3. We need to replace it with: @ini_set(‘display_errors’,’on’);
PrestaShop v1.5.3 and later versions (including 1.6 and 1.7)
1. Firsly, open config/defines.inc.php
2. And find the line: define(‘_PS_MODE_DEV_’, false);
3. Replace it with: define(‘_PS_MODE_DEV_’, true);
Finally, we can browse our store’s front or back office to find out the issue.
Once the source of the problem is known, basically the solution is to clean and delete all PrestaShop cache files that contain the two folders “dev” and “prod”.
Generally, these files do not get automatically deleted from the “Empty cache” ” option. Hence we need to remove or clean it manually.
How to fix PrestaShop back office error 500
We will see the methods that our support engineers follow to fix the PrestaShop back office error 500.
1. Fixing Permission error
In many cases, this error occurs due to wrong folder permissions.
To correct this error, we need to set the folder authorization to 755 instead of 777 (or vice versa).
2. Correcting configuration of the .htaccess file
Internal server problems like 500 errors often arise when we configure the .htaccess file wrongly.
In PrestaShop, the problems are generally will be related to URL re-writing options and activating “friendly URLs”.
We can back up the .htaccess file and restore it from the back office or disable friendly URLs.
A .htaccess file’s format is very strict and even an incorrect character or command could cause an internal 500 server error.
Therefore, from the “friendly URLs” option, indicating “NO” could be a solution (do not forget to save the changes).
3. How to fix ‘Waiting time has expired’
Each server has its own waiting time, which determines how long a script will run.
If the function or script exceeds this time limit, we will receive a 500 error.
Here are the PrestaShop scripts that may take too long to load:
1. Importing CSV files
2. Backup files
3. Loading translations
4. Import/export
5. Regenerating miniature views
Generally, the server time limit is 30 seconds, which is not enough for these scripts.
If it is not so, we can ask our hosting provider to change this setting at least temporarily.
4. Reviewing addons to fix Obsolete modules
While updating the shop from version 1.6 to version 1.7, we may encounter obsolete modules or modules that are incompatible with this new version of PrestaShop.
This may also generate 500 errors. We need to review all the Addons we have previously installed or at least those that are available in a more recent version. So that we can find out what causes the incompatibility.
[Need assistance? We can help you]
Conclusion
In short, we saw how our Support Engineers fix Prestashop back office error 500 for our customers.
0 Comments