Un error común que hemos visto es la “pantalla blanca de Prestashop” or the “página en blanco de Prestashop”.
Table of Contents
ToggleThere are many reasons for this error to occur.
Here are the main causes we have seen, and how we have solved them. But if you need help to solve technical problems of Prestashop you can contact at the link.
1. Límite de memoria
By far the most common reason for “white screen of death” is Prestashop hitting the PHP memory limit.
Depending on your default server configuration, the memory allowed for the PHP process might be limited to 32 MB, 64 MB or 128 MB.
Prestashop requires at least 128 MB to run, and some add-ons may take more memory than that. A good configuration would be “256 MB”, o “512 MB” if you have a VPS.
There are many ways to increase PHP memory size.
The safest way is to edit the php.ini file in our website account.
Edit the php.ini file, and change the setting “memory_limit” a “512 M”.
If the php.ini file is not present in your account, you can do so using the .htaccess file. Add this line to your .htaccess file.
php_value memory_limit 512M
2. Permisos incorrectos de archivos y carpetas
The second most common reason for “Prestashop white page” are incorrect permissions set for files and folders.
This is especially true for servers where SuPHP or Fast-CGI is enabled.
For Prestashop to work correctly, it is necessary to set these permissions
755 – For the folders
644 – For the files
On some older servers, PHP files might be set to CGI, and would require 755 permissions, but those conditions are rare.
If you suspect that the file or folder permissions may be wrong, reset the permissions for the entire Prestashop directory.
For example, on cPanel/WHM servers, we use these commands to reset file and folder permissions:
find /home/USERNAME/public_html -type d -exec chmod 755 {} \;
find /home/USERNAME/public_html -type f -exec chmod 644 {} \;
3. Archivos corruptos o codificación incorrecta
PHP scripts can be a bit picky when it comes to missing spaces or incorrect file encoding.
Ideally, your PHP scripts should be saved and uploaded in ANSI file format.
But, depending on your text editor, it might save the file in UTF-8, which the PHP compiler won't understand.
It's also possible that in your attempt to change something, you accidentally entered a space before the initial tag “<? php>”.
The best way to resolve this is to download a fresh copy of Prestashop, and replace the recently modified files.
If you've made extensive changes to your files, you'll need to manually check the file formats and comb them for syntax errors.
4. Coding error in newly installed/updated module or theme
Prestashop addons (themes and modules) help you set up a store just the way you imagined it.
But the downside is that some of these themes and modules may not be well maintained.
Many times we have seen a module that uses obsolete functions, or incorrect code, causing Prestashop to show a white screen.
So, if the white screen is displayed after you have recently installed or updated a new plugin, try deleting that plugins folder from the backend. It should be located in the folder “/themes/” The “/modules/” in the public_html of your Prestashop.
5. Missing PHP Modules
For Prestashop to work, you need these PHP modules:
Mcrypt
OpenSSL
Zip
Curl
GD
PDO
On some servers, especially if you have a VPS, one or more of these modules may not be installed.
We have also seen cases where they are installed, but are not enabled in the PHP configuration file.
To check if these modules are enabled for your website, copy the following code to a file called “phpinfo.php” and upload it to your site. Then grab it in a browser and check for these extensions.
<?
phpinfo();
?>
If any of these modules are missing, check your server's php.ini to see if it is enabled. If not, you will have to install them.
6. Database connection limit
In a couple of stores we have seen the error “PrestaShop Fatal error: no utf-8 support. Please check your server configuration”.
It may appear that UTF-8 support is not enabled on the server.
But in reality, it is just Prestashop unable to execute a query to the database.
Some servers have database query limits (for example, 10,000 queries per hour). Any query above that limit will not be sent to the MySQL database, and will show the UTF-8 error.
Of course, it's also possible that the UTF-8 encoding in your database has changed for some reason.
If you have a VPS, you can fix this by changing the variable “max_questions” in the MySQL configuration file a “0” (means unlimited).
7. Stale cache, bad .htaccess and many others
There are many other reasons why Prestashop may display a white page. Some of them are
Stale cache: Old pages could conflict with new recompiled pages. To fix this, disable the cache and run a forced rebuild.
Errors in .htaccess file: Syntax errors in .htaccess files, especially those used to pass PHP variables, can cause compilation errors.
Security Settings: Some security settings such as mod_security limits can cause execution to fail. You will have to find out by looking at the web server logs.
Many more: Basically anything that blocks the correct execution of Prestashop files can cause this error. If none of these seem to fit your problem, you'll need to enable error reporting.