From b5f6a1a03de9343ffc718ce253f7730e4d8d6c19 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Tue, 29 Mar 2016 13:36:35 -0400
Subject: [PATCH] Fix for #3812 Insufficient validation of PHP version selector for ISPConfig 3.1 branch.

---
 install/lib/update.lib.php |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php
index 9fb57cb..a6bb42d 100644
--- a/install/lib/update.lib.php
+++ b/install/lib/update.lib.php
@@ -125,7 +125,12 @@
 
 	//* 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');
+	if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') {
+		echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n";
+		echo "    sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n";
+		echo"to the mysqld-section in /etc/mysql/my.cnf and restart mysqld afterwards\n";
+		die();
+	}
 
 	//* 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']);

--
Gitblit v1.9.1