Marius Cramer
2015-05-07 f6e42fc631acad20006ad79f63ccecc0a86ad0eb
install/install.php
@@ -171,8 +171,16 @@
//** Get the hostname
$tmp_out = array();
exec('hostname -f', $tmp_out);
$conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg server1.domain.tld ', @$tmp_out[0],'hostname');
$conf['hostname'] = @$tmp_out[0];
unset($tmp_out);
//** Prevent empty hostname
$check = false;
do {
   $conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg server1.domain.tld ', $conf['hostname'], 'hostname');
   $conf['hostname']=trim($conf['hostname']);
   $check = @($conf['hostname'] !== '')?true:false;
   if(!$check) swriteln('Hostname may not be empty.');
} while (!$check);
// Check if the mysql functions are loaded in PHP
if(!function_exists('mysql_connect')) die('No PHP MySQL functions available. Please ensure that the PHP MySQL module is loaded.');