diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index edeb215d5b9abacbd5d405e2519376a3ed2bb707..76e721b249af77ec7efe4d1c3443b0ca994c7a43 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -181,6 +181,11 @@ class installer_base {
 	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'].'.');
diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php
index 1813a19a21e00e7184d24cba5be16f29f573ff92..9fb57cb655862c26c8a6b6ad3212cf2d85f4ce97 100644
--- a/install/lib/update.lib.php
+++ b/install/lib/update.lib.php
@@ -123,6 +123,10 @@ function checkDbHealth() {
 function updateDbAndIni() {
 	global $inst, $conf;
 
+	//* check sql-mode
+	$check_sql_mode = $inst->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');
+
 	//* Update $conf array with values from the server.ini that shall be preserved
 	$tmp = $inst->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']);
 	$ini_array = ini_to_array(stripslashes($tmp['config']));