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 :)

PrestaSEO AI++.

PrestaSEO AI module

PrestaSEO AI++ is a cutting-edge module designed to take your PrestaShop store’s SEO to the next level. Built with advanced automation and AI technology, it streamlines SEO tasks, making optimization easier and more effective.

Whether you're focused on improving local visibility or cleaning up your site's URL structure, PrestaSEO AI provides a comprehensive suite of features to enhance your store's performance.

Ultimo aggiornamento moduli!

Age Restriction - 18+ ⊙
Risolvere alcuni problemi di visualizzazione sui dispositivi mobili.


Newsletter Popup v3.2.2
Christmas Edition per incrementare le tue vendite.


Trusty v1.4.7 ⊙ 
Compatibile con PrestaShop 1.7 e PrestaShop 8.


PrestaSOO team
Tutto il necessario per guadagnarti da vivere facendo il lavoro che ami.

Scoprire


È un investimento saggio

I moduli Prestashop che abbiamo creato per primi per risolvere il problema del nostro business - un sito di e-commerce. Ciò significa che sono molto utili per un'azienda seria. Se apprezzi la tua proprietà web, questi moduli sono un investimento saggio.
Sarah Reeves, Sviluppatore di app @ PrestaSOO
Realizzato con a Parigi e Hanoi
PrestaSOO © 2024. Tutti i diritti riservati. // Politica sulla riservatezza Termini di servizio