Note to php and zen cart experts: Could you please verify this below me and mention any pro's con's to other users!
Note to any sufferors of date.timezone not set error during instalation:
Please check for coments below before trying this method, not yet tested fully, only peform thi fix knowing what it affects or by having confirmation from a php/zen cart expert... As I am only 16.. nontheless have a read and coment pro's con's ps- only comment pros cons if 100% sure.. ;)
Solution:
Provided that you are able to change the Default timezone or even better the date.timezone in a phpinfo() file via any method other than the global php.ini file.. such as following:
PHP Code:
@ini_set('date.timezone', 'Europe/London'); // to the required php files ie: index.php in the Root, the Admin and the zc_install directories
//or..
putenv("TZ='Europe/London"); // to the required php files ie: index.php in the Root, the Admin and the zc_install directories
//or..
date_default_timezone_set('Europe/London'); // to the required php files ie: index.php in the Root, the Admin and the zc_install directories
//or..
date.timezone = America/Chicago ; in the htaccess in the following: in the Root, the Admin and the zc_install directories
//or..
php_value date.timezone "America/Chicago" ; in the htaccess in the following: in the Root, the Admin and the zc_install directories
and the result is a changed timezone in phpinfo().. //Note: Check phpinfo() in all directories mentioned above^
Then you should be able to change this piece of code in ROOT/zc_install/includes/aplication_top.php:
PHP Code:
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.');
} elseif (PHP_VERSION >= '5.1') {
$baseTZ = date_default_timezone_get();
date_default_timezone_set($baseTZ);
unset($baseTZ);
}
For this one:
PHP Code:
if (PHP_VERSION >= '5.1') {
$baseTZ = date_default_timezone_get();
date_default_timezone_set($baseTZ);
unset($baseTZ);
}
or.. perhaps even better would be to substitute: // because it checks local settings that would be changed by the five methods mentoned above
PHP Code:
if (PHP_VERSION >= '5.3' && ini_get('date.timezone') == '')
for:
PHP Code:
if (PHP_VERSION >= '5.3' && date_default_timezone_get('date.timezone') == '')
the effect yet to be found.. but what you are infact doing is removing a check that is not necessary, because in live mode one of the five modes mentioned above to change the default timezone of your server will be sufficient to run Zen cart v1.5
Bookmarks