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

Halloween theme

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.

Aktualizacja najnowszych modułów!

Age Restriction - 18+ ⊙
Rozwiąż niektóre problemy z wyświetlaniem na urządzeniach przenośnych.


Newsletter Popup v3.2.2
Edycja świąteczna, aby zwiększyć sprzedaż.


Trusty v1.4.7 ⊙
Kompatybilny zarówno z PrestaShop 1.7, jak i PrestaShop 8.


PrestaSOO team
Wszystko, czego potrzebujesz, aby zarabiać na życie wykonując pracę, którą kochasz.

Odkryć

To mądra inwestycja

Moduły PrestaShop, które stworzyliśmy jako pierwsze, aby rozwiązać problem naszego własnego biznesu - strona e-Commerce. Oznacza to, że są bardzo przydatne w poważnym biznesie. Jeśli cenisz swoją usługę internetową, te moduły są mądrą inwestycją.
Sarah Reeves, Programista aplikacji @ PrestaSOO
Wykonane z w Paris i Hanoi
PrestaSOO © 2024. Wszelkie prawa zastrzeżone. // Polityka prywatności Warunki usługi