From 670d377b168920cbef42ca4ce6e583542c8788a9 Mon Sep 17 00:00:00 2001 From: Florian Schaal <florian@schaal-24.de> Date: Thu, 02 Jul 2015 10:07:32 -0400 Subject: [PATCH] check sql-mode during install and setup --- install/lib/installer_base.lib.php | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index edeb215..76e721b 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -181,6 +181,11 @@ public function configure_database() { global $conf; + //* check sql-mode + $check_sql_mode = $this->db->queryOneRecord("SELECT @@sql_mode"); + + if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') die('Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION'); + //** Create the database if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['mysql']['database'], $conf['mysql']['charset'])) { $this->error('Unable to create MySQL database: '.$conf['mysql']['database'].'.'); -- Gitblit v1.9.1