ERROR: date.timezone not set in php.ini
Hi
Using a Linux dedicated server with fresh install of PHP 5.39
Cannot run the installer full error message is;
ERROR: date.timezone not set in php.ini. Please contact your hosting company to set the timezone in the server PHP configuration before continuing.
I've added the timezone information into the php.ini but the install still isn't able to install zen cart
Phpinfo here http://205008.com/phpinfo.php
date
date/time support enabled
"Olson" Timezone Database Version 2011.14
Timezone Database internal
Default timezone Europe/London
Re: ERROR: date.timezone not set in php.ini
Phpinfo removed as rebuilding server.
Re: ERROR: date.timezone not set in php.ini
Quote:
Originally Posted by
merlin57
ERROR: date.timezone not set in php.ini.
The message means exactly what it says.
Re: ERROR: date.timezone not set in php.ini
Quote:
Originally Posted by
DrByte
The message means exactly what it says.
im having this problem but in my php.ini file i have got my timezone set...
but yet when i do phpinfo it doesn't show my timezone, any idea??? :D
Re: ERROR: date.timezone not set in php.ini
The test is based on the server's master php.ini, and NOT a localized/override/custom php.ini file.
Talk to the server administrator for help in fixing the server's master PHP configuration to work correctly.
Re: ERROR: date.timezone not set in php.ini
Your site http://205008.com is not loading at all it's redirecting to another site http://www.powerfurniture.com/(also yours?)
A traceroute to 205008.com verifies your host is in the UK which explains the timezone in the phpinfo. If you ask your host and they are worth their salt (and using virtual hosting on Apache) you should be able to request them to add a custom php.ini file directive to your site's virtual host container:
<VirtualHost 79.170.43.204:80>
[...]
PHPINIDir /var/www/205008.com
[...]
</VirtualHost>
But if it's a truly dedicated server you should be able to edit the php.ini file directly. And not be sharing a server with another customer.
Re: ERROR: date.timezone not set in php.ini
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.. :D 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
Re: ERROR: date.timezone not set in php.ini