
Originally Posted by
lat9
FWIW, I was able to work around this restriction by changing /zc_install/includes/application_top.php (line 52) to comment out the lines associated with the restriction:
Code:
/**
* Timezone problem detection
*/
//if (PHP_VERSION >= '5.3' && ini_get('date.timezone') == '')
//{
// die('ERROR: date.timezone not set in php.ini. Please contact your hosting company to set the timezone in the server PHP configuration before continuing.');
/*} else*/ if (PHP_VERSION >= '5.1') {
$baseTZ = date_default_timezone_get();
date_default_timezone_set($baseTZ);
unset($baseTZ);
}
It turns out that, while 1and1 doesn't set a default timezone in the php.ini, they do set a default via date_default_timezone_set(). That said, modifying the fragment in the installation application_top.php to the following allows the install to (properly) proceed on a 1and1 server while preserving the integrity of the PHP environment (i.e. the date/timezone is set as required for PHP v5.4 and later):
Code:
/**
* Timezone problem detection
*/
if (PHP_VERSION >= '5.3' && /*ini_get('date.timezone')*/ date_default_timezone_get() == 'UTC')
{
die('ERROR: date.timezone not set in php.ini. Please contact your hosting company to set the timezone in the server PHP configuration before continuing.');
} else if (PHP_VERSION >= '5.1') {
$baseTZ = date_default_timezone_get();
date_default_timezone_set($baseTZ);
unset($baseTZ);
}