mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
- check if date.timezone is set, report it and set something if not, as it gives tons of errors in install log
- some MySQL packages (mysql.com, MariaDB, ...) use "mysql" as service name instead of RH default "mysqld"
This commit is contained in:
parent
69ec8bc87a
commit
accb0137a5
@ -75,6 +75,14 @@ if (($lang = isset($_ENV['LANG']) ? $_ENV['LANG'] : $_SERVER['LANG']))
|
|||||||
}
|
}
|
||||||
$config['source_dir'] = dirname(dirname(dirname(__FILE__)));
|
$config['source_dir'] = dirname(dirname(dirname(__FILE__)));
|
||||||
|
|
||||||
|
// check if date.timezone is set, report it and set something if not, as it gives tons of errors in install log
|
||||||
|
if (!ini_get('date.timezone'))
|
||||||
|
{
|
||||||
|
if (!($tz = date_default_timezone_get())) $tz = 'UTC';
|
||||||
|
echo "No default timezone (php.ini date.timezone) set, we temporary set '$tz'. You should fix that permanent!\n";
|
||||||
|
ini_set('date.timezone',$tz);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set distribution spezific defaults
|
* Set distribution spezific defaults
|
||||||
*
|
*
|
||||||
@ -132,7 +140,15 @@ function set_distro_defaults($distro=null)
|
|||||||
default:
|
default:
|
||||||
$config['distro'] = 'rh';
|
$config['distro'] = 'rh';
|
||||||
// fall through
|
// fall through
|
||||||
case 'rh': // nothing to do, defaults are already set
|
case 'rh':
|
||||||
|
// some MySQL packages (mysql.com, MariaDB, ...) use "mysql" as service name instead of RH default "mysqld"
|
||||||
|
if (!file_exists('/etc/init.d/mysqld') && file_exists('/etc/init.d/mysql'))
|
||||||
|
{
|
||||||
|
foreach(array('start_db','autostart_db') as $name)
|
||||||
|
{
|
||||||
|
$config[$name] = str_replace('mysqld','mysql',$config[$name]);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user