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.

Latest modules update!

iConvert Promotions 8.0.0 ⊙

Optimize source codes to improve the performance and user experiences on PrestaShop 8, resolved various issues to enhance compatibility with PrestaShop 1.7.x.


DocumenThemix 3.3.7 ⊙

Compatible with PrestaShop 8.


ChargeMe v5.4.1 ⊙

Clear the cart & redirect to the checkout page.


Age Restriction - 18+ v2.3.6⊙

Fix page assignment issues.


Newsletter Popup v3.2.5 ⊙

Enhance the level of security.


JumptoCheckout v.2.1.1 ⊙

Fix the deleting product issue.


PrestaSOO team

Trusted by 7k++ clients.

Modules you need to make a living doing work you love.

Discover

It is a wise investment

PrestaShop modules we created first to solve the problem of our own business - an e-Commerce site. That means they are very useful for serious business. If you value your web property, these modules are a wise investment.
Sarah Reeves, App Developer @ PrestaSOO
Made with in Paris & Hanoi
PrestaSOO © 2024. All rights reserved. // Privacy Policy Terms of Service