How to resolve the most common PrestaShop errors

How to resolve the most common PrestaShop errors

PrestaShop is one of the most popular CMS platforms for online stores. It offers a wide range of plugins, modules, and themes to customize and add new functionalities to your shop. As usual, while working with the application, error messages may appear. Below, we explain how to resolve some of the most common PrestaShop errors.


1.- Maximum execution time exceeded 
A very common error while working with PrestaShop is the execution time exceeded error. This occurs when a process runs longer than the execution time configured in the hosting PHP settings. The error message is similar to the following:

"Fatal error: Maximum execution time of 10 seconds exceeded in /usr/home/example.com/web/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php on line 180"

In this case, we can solve it by increasing the execution time from the Configure PHP section within the hosting Control Panel.

2.- Request entity too large
When uploading a theme or performing operations with large files, a window with the error "Request entity too large" may appear. This error is caused by the PHP post_max_size limit. We can fix it by accessing the hosting Control Panel, in the Configure PHP section, and increasing the post_max_size parameter.

3.- Maximum field name warning
When working with forms and some translation tools, you may see a warning message such as:

Warning, your PHP configuration limits the maximum number of fields to post in a form: 1000 for max_input_vars.
Please ask your hosting provider to increase this limit to at least 1318 or edit the translation file manually.

As with the previous errors, this is also a PHP parameter that can be increased from the hosting Control Panel, in the Configure PHP section. Increase the max_input_vars parameter.

4.- Error accessing the administration panel
An error you may encounter when trying to access the administration panel is the following:

Warning: tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/usr/home/example.com/:/home/example.com/:/usr/home/services/:/usr/share/php/) in /usr/home/example.com/web/classes/PrestaShopAutoload.php on line 151 

This error occurs because PrestaShop is trying to access a directory where it does not have permission. It is an issue in the PrestaShopAutoload.php file and can be fixed by replacing it with the official repository version.

Connect via FTP, go to the classes directory, rename the existing PrestaShopAutoload.php file first, then upload the downloaded file. After that, you should be able to access the PrestaShop administration panel.

5.- Warning Bad Request
PrestaShop may display an informational notice about mod_security such as:

Apache mod_security is activated on your server. This could result in some Bad Request errors

mod_security is a security module installed on the server. From the hosting Control Panel, in the Firewall section, it can be disabled. Even so, PrestaShop may still display the message because, although disabled, the module remains installed on the server. If it is disabled from the Control Panel, you can safely ignore this warning.

6.- Blank page
Sometimes PrestaShop may display a blank page. The main cause of this behavior is usually when the application needs a higher memory limit. You can increase this PHP parameter from the hosting Control Panel in the Configure PHP section. One way to identify the error causing the blank page is by enabling DEBUG mode. This can be done by editing the defines.inc.php file inside the config folder where PrestaShop is installed.

Modify the line:

define('_PS_MODE_DEV_', false);
to:
define('_PS_MODE_DEV_', true);

This way, PrestaShop will display error messages instead of showing a blank page. It can be very useful to identify the source of the issue.


For more information, you can contact us.
    • Related Articles

    • How to resolve Magento's most common mistakes

      Magento is a popular e-commerce content management system that allows us to manage our online store in a flexible and scalable way. Below, we explain how to resolve some of the most common errors you may encounter with Magento. How to view error ...
    • How to resolve Joomla's most common mistakes

      Joomla is a popular content management system that allows us to create dynamic websites easily. One of its particular features is the ability to add new functionalities through extensions such as components, modules, templates, and plugins. Like all ...
    • .htaccess default from PrestaShop

      The .htaccess file is a configuration file used on Apache-based web servers. It is used to control and configure the behavior of a website. The .htaccess file has multiple functions and allows you to customize a website’s configuration in a specific ...
    • What is and how to fix the ERR_TOO_MANY_REDIRECTS error

      It is likely that while browsing the internet or even on your own website, you may have encountered an ERR_TOO_MANY_REDIRECTS message indicating that there are too many redirects to complete the connection. The error usually looks like this: This ...
    • How to activate the display_errors directive

      The display_errors directive determines whether errors should be printed on screen as part of the output or hidden from the user. This value can be enabled from the hosting management you want to configure. You need to go to the "Server" column and ...