set sql_mode to disable STRICT_MODE usage for froxlor, thx to albech for the hint

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2017-11-08 07:49:40 +01:00
parent dd3e5e9c6b
commit 1e03946df7
3 changed files with 5 additions and 5 deletions

View File

@@ -204,7 +204,7 @@ class FroxlorInstall
$content .= $this->_status_message('begin', $this->_lng['install']['testing_mysql']);
$options = array(
'PDO::MYSQL_ATTR_INIT_COMMAND' => 'set names utf8'
'PDO::MYSQL_ATTR_INIT_COMMAND' => 'SET names utf8,sql_mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"'
);
$dsn = "mysql:host=" . $this->_data['mysql_host'] . ";";
$fatal_fail = false;
@@ -240,7 +240,7 @@ class FroxlorInstall
$content .= $this->_importDatabaseData();
// create DB object for new database
$options = array(
'PDO::MYSQL_ATTR_INIT_COMMAND' => 'set names utf8'
'PDO::MYSQL_ATTR_INIT_COMMAND' => 'SET names utf8,sql_mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"'
);
$dsn = "mysql:host=" . $this->_data['mysql_host'] . ";dbname=" . $this->_data['mysql_database'] . ";";
$another_fail = false;
@@ -511,7 +511,7 @@ class FroxlorInstall
$content = "";
$content .= $this->_status_message('begin', $this->_lng['install']['testing_new_db']);
$options = array(
'PDO::MYSQL_ATTR_INIT_COMMAND' => 'set names utf8'
'PDO::MYSQL_ATTR_INIT_COMMAND' => 'SET names utf8,sql_mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"'
);
$dsn = "mysql:host=" . $this->_data['mysql_host'] . ";dbname=" . $this->_data['mysql_database'] . ";";
$fatal_fail = false;