Welcome to the Koken CMS community!

Here at KCS, you will find a friendly bunch of photographers who like to share their love for the Koken CMS. We hope that you will enjoy your time here and thrive in our community!

You asked for it: Donations!
You asked for it, and it's here: The possibility to "buy me a beer (or more)"!

Seriously: By giving a small paypal donation you will help with keeping this site afloat and also give me more incentive to develop OxyGen further... ;)

// Bjarne Varöystrand and the KCS Team
Koken Development

[HOW TO] Disable MySQL strict mode on your VPS

Have some useful codesnippets that you want to share with the community, please feel free to post them here.
Dont forget, not every user is a "die hard php- jugger naut" so please supplie some instructions together with your code.
User avatar
kenthhagstrom
Developer
Developer
Posts: 16
Joined: Mon 20 Feb 2017, 17:48
Your name: Kenth Hagström
Location: Borlänge
Contact:

[HOW TO] Disable MySQL strict mode on your VPS

Postby kenthhagstrom » Tue 21 Mar 2017, 08:55

Because of the fact that Koken is not compatible with MySQL strict mode, some of you might want to know how to disable this on your VPS. It's really not that complicated and it will save you from some frustration. This is written and tested on Ubuntu v16.10 but should work with a few other dists, Debian etc.

First log in to you server using SSH (you will need sudo privileges), first you need to find your my.cnf file (make sure you edit the correct file, the one that MySQL loads), open it and then change the sql_mode parameter (located below the [mysqld] text) to this (if it does not already exist, add it) OR you could add a new file inside the /etc/mysql/conf.d/ directory, name it disable_strict_mode.cnf and add the lines below.

Code: Select all

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


Save and exit your text editor. Then restart mysql.

sudo systemctl restart mysql

Now you're done and Koken should work just fine and not mess up your database tables!

If you'd like to dive more into why I've selected these modes, check out the MySQL documentation.

You can read about some of the Koken issues with strict mode on these urls:
https://kokensupport.com/viewtopic.php?f=8&t=429&p=1957&hilit=mysql+strict#p1953
https://kokensupport.com/viewtopic.php?f=9&t=510&p=2396&hilit=mysql+strict#p2396
http://help.koken.me/customer/portal/questions/16795160-creating-sets-does-not-work?t=484231
User avatar
awair
Donator
Donator
Posts: 5
Joined: Thu 26 Apr 2018, 14:02
Your name: Andrew

Re: [HOW TO] Disable MySQL strict mode on your VPS

Postby awair » Wed 06 Jun 2018, 23:28

A million thank yous!

You have saved my installation: was migrating from an underpowered physical host to a VPS, obviously different versions of everything, and I was unable to replicate my project structure. It looked like my site and future were doomed.

Apparently all fixed now, and I can proceed at "full pace" with my new host.

Thank you again.

For info: running LAMP on DO (Ubuntu 16.04)

I've had absolutely no response from Koken, but this forum seems to have all the answers. A donation is on the way...

  • Similar Topics
    Replies
    Views
    Last post

Return to “Code Snippets”



Who is online

Users browsing this forum: No registered users and 1 guest