Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

date.timezone option in php.ini must be set in PHP 5.3.0+


Go to End


19 Posts   116160 Views

Avatar
sagarawasthi

Community Member, 1 Post

25 May 2011 at 12:10am

By commenting lines 381, 382 & 383 in Install.php, It will skip that step and start the installation;

i.e.

/*
if(version_compare(PHP_VERSION, '5.3.0', '>=')) {
$this->requireDateTimezone(array('PHP Configuration', 'date.timezone set and valid', 'date.timezone option in php.ini must be set in PHP 5.3.0+', ini_get('date.timezone')));
}
*/

It works for me, cheers!

Avatar
CHD

Community Member, 219 Posts

25 May 2011 at 6:26am

i just came across this too...i think its the new verison of SS? as my previous 30+ sites worked fine!
anyway, checked my php.ini and found it was commented out!

[Date]
; Defines the default timezone used by the date functions
;date.timezone = Europe/London

just removed the ";" restarted apache and now is all well.

Avatar
marajit

Community Member, 1 Post

22 November 2011 at 9:00pm

List of places: http://php.net/manual/en/timezones.php

I set to one of these and it worked, but then when I enabled mod_rewrite on Ubuntu with "sudo a2enmod rewrite" - a requirement further on - it broke the timezone again.

??

Avatar
matchavez

Community Member, 2 Posts

22 March 2012 at 4:46pm

To echo Seidlitz, the Canada/Pacific time zone and all of the "other" zones were deprecated. Why? idk, but it's probably where this problem lies. Seems a silly effort on the part of PHP...

http://cl.ly/292V0u2z1w1O2m2V0238
http://www.php.net/manual/en/timezones.others.php

Avatar
N3mA

Community Member, 3 Posts

6 September 2012 at 12:44am

Edited: 06/09/2012 12:45am

Hi,

I am trying to install SilverStripe on ubuntu and got the following error:

date.timezone setting and validity date.timezone option in php.ini must be set correctly.

I set the date.timezone = "Europe/Stockholm" and restart apache server but it didnt work.

As an alternative solution, I installed the PECL timezonedb module: sudo php /usr/share/php/peclcmd.php install timezonedb, then add extension=timezonedb.so to php.ini and restart apache again BUT I still have a problem.
I would really appreciate if someone can help me to solve this problem. I spent so much time on it.

Thanks in advance!

Avatar
(deleted)

Community Member, 473 Posts

6 September 2012 at 7:47am

date.timezone is a weird setting and doesn't like the quotes. Try just date.timezone = Europe/Stockholm

Avatar
tmedtcom

Community Member, 2 Posts

14 September 2012 at 11:02pm

this response is correct :

just removed the ";" restarted apache and now is all well.

Avatar
vam

Community Member, 7 Posts

4 October 2012 at 2:08pm


I just hit this error on a new install of 2.4.5. I'm running a Mac using the native Apache/PHP. My timezone was set to Australia/ACT. This is a valid entry and confirmed in phpinfo(). I changed it to Australia/Melbourne and SS is now happy to proceed.

It may be worth changing the timezone and changing back to see if that fixes the problem.

This worked for me too. Thanks for the tip. :)