Prestashop on Ubuntu 16.04 : My products are stolen ?

When i upgraded my Prestashop server from Ubuntu 14.04 to Ubuntu 16.04, my Prestashop products were not displayed on category pages. Who did take them from me ? My server has been hacked ?

Actually, this is a database issue due to Mysql 5.7 on Ubuntu 16.04. Do you have a plan to download Prestashop and install your ecommerce website on an Ubuntu server ? It's a good idea but this issue will effect to any Prestashop websites running on Ubuntu 16.04. Take some minutes here to know how to fix it!!!

Prestashop on Ubuntu 16.04 : My products are stolen ?

I received a message from @Casper_O on Twitter that products on our Prestashop demo page were not displayed on category pages that running on an Ubuntu 16.04 LTS server with Apache, Pagespeed, PHP 7 and MySQL 5.7. Take a few minutes on it, i saw few MySQL queries failed and the products were not displayed correctly.

Mysql error not show Prestashop products

I didn’t took long for me to realized that this is due to MySQL Strict mode. Prestashop 1.6 ( and Prestashop 1.7 ? ) are not compatible with MySQL strict mode. We have to turn it off to fixed the error. Another applications that are not compatible with MySQL Strict Mode. So if you have a plan to run your Prestashop website on Ubuntu 16.04, you should consider disabling Strict mode.

What is MySQL Strict Mode?

Strict mode handles how invalid or missing values in SQL queries. It’s available in both MySQL and MariaDB and enabled by default in MySQL 5.7 and MariaDB 10. Although disabling it is safe on most cases, sometimes it may cause unexpected errors in database tables.

How to Disable MySQL Strict Mode?

It’s relatively easy to disable MySQL strict mode in Ubuntu 16.04 LTS. This may work on other versions of Linux such as CentOS. Start by login in to your VPS as root user with SSH and create a new .cnf file :

sudo nano /etc/mysql/conf.d/strict_mode.cnf

Paste the following code into that file :

[mysqld]
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUT

Save and close the file. And then restart MySQL server.

service mysql restart

That's all :)

Get this Advanced Cart Rules module

New module.

Xleft module

Xleft shows customers how much more they need to spend to get free shipping in real time.

¡Última actualización de módulos!

Age Restriction - 18+ ⊙
Solucione algunos problemas de visualización en dispositivos móviles.


Newsletter Popup v3.2.2
Edición de Navidad para impulsar tus ventas.


Trusty v1.4.7 ⊙
Compatible con PrestaShop 1.7 y PrestaShop 8.

PrestaSOO team
Todo lo que necesita para ganarse la vida haciendo el trabajo que ama.

Descubrir


Es una sabia inversión

Los módulos de Prestashop que creamos primero para resolver el problema de nuestro propio negocio: un sitio de comercio electrónico. Eso significa que son muy útiles para un negocio serio. Si valora su propiedad web, estos módulos son una inversión inteligente.
Sarah Reeves, Desarrollador de aplicaciones @ PrestaSOO
Hecho con en París y Hanoi
PrestaSOO © 2024. Reservados todos los derechos // Privacy Policy Terms of Service