From 399f825f9d41e81c2bd43fb3316ce72d44d0175a Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 10 Mar 2009 19:56:57 +0000
Subject: [PATCH] Split the mysql host into port and hostname in installer
 before trying to get the IP.

---
 install/install.php                | 4 +++-
 install/lib/installer_base.lib.php | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/install/install.php b/install/install.php
index 62676e739..9474eb5b0 100644
--- a/install/install.php
+++ b/install/install.php
@@ -129,7 +129,9 @@ do {
 unset($finished);
 
 // Resolve the IP address of the mysql hostname.
-if(!$conf['mysql']['ip'] = gethostbyname($conf['mysql']['host'])) die('Unable to resolve hostname'.$conf['mysql']['host']);
+$tmp = explode(':',$conf['mysql']['host']);
+if(!$conf['mysql']['ip'] = gethostbyname($tmp[0])) die('Unable to resolve hostname'.$tmp[0]);
+unset($tmp);
 
 
 //** initializing database connection
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 1372c8c29..77d0c4371 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -247,9 +247,9 @@ class installer_base {
 			$this->dbmaster->query('FLUSH PRIVILEGES;');
 		
 			//* Create the ISPConfig database user in the local database
-        	$query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$conf['mysql']['master_database'].".* "
+        	/*$query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$conf['mysql']['master_database'].".* "
                 	."TO '".$conf['mysql']['master_ispconfig_user']."'@'".$from_host."' "
-                	."IDENTIFIED BY '".$conf['mysql']['master_ispconfig_password']."';";
+                	."IDENTIFIED BY '".$conf['mysql']['master_ispconfig_password']."';";*/
 			$query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$conf['mysql']['master_database'].".* "
                 	."TO '".$conf['mysql']['master_ispconfig_user']."'@'".$from_ip."' "
                 	."IDENTIFIED BY '".$conf['mysql']['master_ispconfig_password']."';";
-- 
GitLab