Jump to content

Prestashop 1.6 - SQL 5.7


Simply123

Recommended Posts

Our hosting company is updating their server.  Our site works on the old server, but not on the new one.  Our Prestashop version is 1.6, the hosting company says the old server is running on sql 5.6 and the new server is runs on sql 5.7. 

Is there a patch that can be installed to run Prestashop 1.6 on sql 5.7?

I found this post:

https://www.prestashop.com/forums/topic/493398-mysql-57-causes-error-when-ps-try-to-insert-date-as-0000-00-00-000000/

but the change could not be applied.  There is no sql config file under the etc/ directory.  Any idea where the code should be inserted?
Link to comment
Share on other sites

Okay.

This problem can be solved by making changes in my.cnf file (Its basically mysql config file). I think you might need to contact the hosting to make the changes.

You need to change the sql mode in the mysql config file (Need to copy these lines in the mysql config file & need to restart the mysql)

[mysqld]
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

 

 

  • Like 1
Link to comment
Share on other sites

Thank you so much for your help Knowband Plugins, this fixed worked.  The error no longer appears on the debug screen.  I have tried a few screens, and still no errors.

Products are accessible and can be added to cart.

There is still an error on signing in though - is this also related to the sql as well?  I activated the console on Chrome and have added the screenshot below.  This is a test domain, as our live site is still on the old server until we can test the process and be sure it is working. 

SS3.jpg

SS4.jpg

Link to comment
Share on other sites

Please see screenshot below -  is this the correct screen?

I activated the https:// recently - I notice everything is popping up with mixed content - I believe the images are still http://.  I just haven't found yet where to change it.  Could this be causing the issue?

SS5.jpg

Link to comment
Share on other sites

 Yes, Its the correct screen.

I can see that login request is blocked by the browser because of mixed content (means you are surfing the site on the https and login requests are going to http). It seems that you have not enabled the HTTPS correctly. 

Go to Admin -> Shop Parameter -> General & enable the "Enable SSL" option (The option which is mentioned in the below screen).

image.png.d893421ab2c79b6b667a5ed0fff9f8c7.png

 

First, you need to click on the "Please click here" link to enable this option. Kindly check if this is enabled OR not.

 

 

Edited by Knowband Plugins (see edit history)
Link to comment
Share on other sites

  • 3 years later...

Hi,

Now our hosting company is updating their server. Our Prestashop version is 1.6, the hosting company says the old server is running on sql 5.6 and the new server is runs on sql 8. 

There is a post that recommends using the code:

"SET SESSION sql_mode=(SELECT REPLACE([spam-filter]sql_mode,'ONLY_FULL_GROUP_BY',''))"

Do you know exactly how I should put it?

thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...