From 7de1b7b5971c74d5b251501b27ea7919e80db923 Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Thu, 21 May 2015 05:12:56 -0400 Subject: [PATCH] - fixed MySQL port separation --- install/install.php | 4 ++-- server/lib/classes/db_mysql.inc.php | 4 ++-- install/update.php | 2 +- interface/lib/classes/db_mysql.inc.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/install/install.php b/install/install.php index 8b32027..c9f6545 100644 --- a/install/install.php +++ b/install/install.php @@ -203,7 +203,7 @@ } //* Initialize the MySQL server connection - if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, (int)$tmp_mysql_server_port)) { + if(@mysql_connect($tmp_mysql_server_host . ':' . (int)$tmp_mysql_server_port, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) { $conf['mysql']['host'] = $tmp_mysql_server_host; $conf['mysql']['port'] = $tmp_mysql_server_port; $conf['mysql']['admin_user'] = $tmp_mysql_server_admin_user; @@ -543,7 +543,7 @@ $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); //* Initialize the MySQL server connection - if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, (int)$tmp_mysql_server_port)) { + if(@mysql_connect($tmp_mysql_server_host . ':' . (int)$tmp_mysql_server_port, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) { $conf['mysql']['master_host'] = $tmp_mysql_server_host; $conf['mysql']['master_port'] = $tmp_mysql_server_port; $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; diff --git a/install/update.php b/install/update.php index 97b28fd..1fec2cc 100644 --- a/install/update.php +++ b/install/update.php @@ -253,7 +253,7 @@ $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); //* Initialize the MySQL server connection - if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, (int)$tmp_mysql_server_port)) { + if(@mysql_connect($tmp_mysql_server_host . ':' . (int)$tmp_mysql_server_port, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) { $conf['mysql']['master_host'] = $tmp_mysql_server_host; $conf['mysql']['master_port'] = $tmp_mysql_server_port; $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index 08a224f..a4d4b33 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -76,13 +76,13 @@ $this->dbNewLink = $conf[$prefix.'db_new_link']; $this->dbClientFlags = $conf[$prefix.'db_client_flags']; - $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, (int)$this->dbPort); + $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, '', (int)$this->dbPort); $try = 0; while((!is_object($this->_iConnId) || mysqli_connect_error()) && $try < 5) { if($try > 0) sleep(1); $try++; - $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, (int)$this->dbPort); + $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, '', (int)$this->dbPort); } if(!is_object($this->_iConnId) || mysqli_connect_error()) { diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index bf43519..a7b8791 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -76,13 +76,13 @@ $this->dbNewLink = $conf['db_new_link']; $this->dbClientFlags = $conf['db_client_flags']; - $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, (int)$this->dbPort); + $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, '', (int)$this->dbPort); $try = 0; while((!is_object($this->_iConnId) || mysqli_connect_error()) && $try < 5) { if($try > 0) sleep(1); $try++; - $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, (int)$this->dbPort); + $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, '', (int)$this->dbPort); } if(!is_object($this->_iConnId) || mysqli_connect_error()) { -- Gitblit v1.9.1