Skip to content

Commit 399f825

Browse files
committed
Split the mysql host into port and hostname in installer before trying to get the IP.
1 parent 86e3bb9 commit 399f825

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

install/install.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@
129129
unset($finished);
130130

131131
// Resolve the IP address of the mysql hostname.
132-
if(!$conf['mysql']['ip'] = gethostbyname($conf['mysql']['host'])) die('Unable to resolve hostname'.$conf['mysql']['host']);
132+
$tmp = explode(':',$conf['mysql']['host']);
133+
if(!$conf['mysql']['ip'] = gethostbyname($tmp[0])) die('Unable to resolve hostname'.$tmp[0]);
134+
unset($tmp);
133135

134136

135137
//** initializing database connection

install/lib/installer_base.lib.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ public function add_database_server_record() {
247247
$this->dbmaster->query('FLUSH PRIVILEGES;');
248248

249249
//* Create the ISPConfig database user in the local database
250-
$query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$conf['mysql']['master_database'].".* "
250+
/*$query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$conf['mysql']['master_database'].".* "
251251
."TO '".$conf['mysql']['master_ispconfig_user']."'@'".$from_host."' "
252-
."IDENTIFIED BY '".$conf['mysql']['master_ispconfig_password']."';";
252+
."IDENTIFIED BY '".$conf['mysql']['master_ispconfig_password']."';";*/
253253
$query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$conf['mysql']['master_database'].".* "
254254
."TO '".$conf['mysql']['master_ispconfig_user']."'@'".$from_ip."' "
255255
."IDENTIFIED BY '".$conf['mysql']['master_ispconfig_password']."';";

0 commit comments

Comments
 (0)