Jump to:

4952 Posts in 14257 Topics by 1491 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » date.timezone option in php.ini must be set in PHP 5.3.0+

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

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

Page: 1 2 3
Go to End
Author Topic: 61789 Views
  • sagarawasthi
    Avatar
    Community Member
    1 Post

    Re: date.timezone option in php.ini must be set in PHP 5.3.0+ Link to this post

    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!

  • CHD
    Avatar
    Community Member
    218 Posts

    Re: date.timezone option in php.ini must be set in PHP 5.3.0+ Link to this post

    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.

  • marajit
    Avatar
    Community Member
    1 Post

    Re: date.timezone option in php.ini must be set in PHP 5.3.0+ Link to this post

    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.

    ??

  • matchavez
    Avatar
    Community Member
    2 Posts

    Re: date.timezone option in php.ini must be set in PHP 5.3.0+ Link to this post

    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

  • N3mA
    Avatar
    Community Member
    3 Posts

    Re: date.timezone option in php.ini must be set in PHP 5.3.0+ Link to this post

    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!

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: date.timezone option in php.ini must be set in PHP 5.3.0+ Link to this post

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

  • tmedtcom
    Avatar
    Community Member
    2 Posts

    Re: date.timezone option in php.ini must be set in PHP 5.3.0+ Link to this post

    this response is correct :

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

  • vam
    Avatar
    Community Member
    7 Posts

    Re: date.timezone option in php.ini must be set in PHP 5.3.0+ Link to this post


    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.

    61789 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.