From cd972d8d0532f7e981ab16e9b0b838927ce77365 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 18 Aug 2008 11:31:22 -0400
Subject: [PATCH] Changed the installer code to use the global $conf array in all installer functions instead of the $conf member variable of the $inst object to fix bug #187.
---
install/install.php | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/install/install.php b/install/install.php
index 2c82e7d..99c60b8 100644
--- a/install/install.php
+++ b/install/install.php
@@ -95,7 +95,7 @@
//** Get the hostname
$tmp_out = array();
exec('hostname -f', $tmp_out);
-$inst->conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg foo.example.com ', $tmp_out[0]);
+$conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg foo.example.com ', $tmp_out[0]);
unset($tmp_out);
//** Get MySQL root credentials
@@ -118,6 +118,10 @@
}
} while ($finished == false);
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']);
+
//** initializing database connection
include_once('lib/mysql.lib.php');
@@ -184,7 +188,7 @@
swriteln('Installing ISPConfig');
//** Customise the port ISPConfig runs on
- $inst->conf['apache']['vhost_port'] = $inst->free_query('ISPConfig Port', '8080');
+ $conf['apache']['vhost_port'] = $inst->free_query('ISPConfig Port', '8080');
$inst->install_ispconfig();
@@ -304,14 +308,14 @@
if($fast_cgi == 'yes') {
$alias = $inst->free_query('Script Alias', '/php/');
$path = $inst->free_query('Script Alias Path', '/path/to/cgi/bin');
- $inst->conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path);
+ $conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path);
} else {
- $inst->conf['apache']['vhost_cgi_alias'] = "";
+ $conf['apache']['vhost_cgi_alias'] = "";
}
*/
//** Customise the port ISPConfig runs on
- $inst->conf['apache']['vhost_port'] = $inst->free_query('ISPConfig Port', '8080');
+ $conf['apache']['vhost_port'] = $inst->free_query('ISPConfig Port', '8080');
$inst->install_ispconfig_interface = true;
--
Gitblit v1.9.1