Jump to:

4872 Posts in 6960 Topics by 1470 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Installation error: [Warning] strtotime() [function.strtotime]:

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

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

Page: 1
Go to End
Author Topic: 7611 Views
  • Happysadhu
    Avatar
    Community Member
    33 Posts

    Installation error: [Warning] strtotime() [function.strtotime]: Link to this post

    Hi,
    I'm trying to install SilverStripe 2.3.3 on Windows XP using the local server XAMPP. During the installation, the following error shows up, which prevents me from finishing the process:
    ------

    [Warning] strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for '-7.0/DST' instead
    POST /SilverStripe/install.php

    Line 263 in C:\xampp\htdocs\SilverStripe\sapphire\core\HTTP.php

    Source

    254
    255    /**
    256     * Set the maximum age of this page in web caches, in seconds
    257     */
    258    static function set_cache_age($age) {
    259       self::$cache_age = $age;
    260    }
    261
    262    static function register_modification_date($dateString) {
    263       $timestamp = strtotime($dateString);
    264       if($timestamp > self::$modification_date)
    265          self::$modification_date = $timestamp;
    266    }
    267
    268    static function register_modification_timestamp($timestamp) {
    269       if($timestamp > self::$modification_date)

    Trace

    * strtotime(2009-08-14 16:43:32)
    Line 263 of HTTP.php
    * HTTP::register_modification_date(2009-08-14 16:43:32)
    Line 206 of DataObject.php
    * DataObject->__construct(Array)
    Line 2534 of DataObject.php
    * DataObject->instance_get_one(URLSegment = 'home',)
    Line 2464 of DataObject.php
    * DataObject::get_one(SiteTree,URLSegment = 'home')
    Line 927 of SiteTree.php
    * SiteTree->requireDefaultRecords()
    Line 214 of DatabaseAdmin.php
    * DatabaseAdmin->doBuild(1)
    Line 793 of install.php
    * Installer->install(Array)
    Line 123 of install.php

    ------

    I've installed Silverstripe a number of times on other systems and I've never gotten this error.

    Any ideas,
    Sam

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Installation error: [Warning] strtotime() [function.strtotime]: Link to this post

    Well, "You are *required* to use the date.timezone setting or the date_default_timezone_set() function" is pretty self explanatory.

    http://us2.php.net/manual/en/function.date-default-timezone-set.php

    Note:

    "Instead of using this function to set the default timezone in your script, you can also use the INI setting date.timezone to set the default timezone.

    See also: http://us2.php.net/manual/en/datetime.configuration.php#ini.date.timezone

  • Happysadhu
    Avatar
    Community Member
    33 Posts

    Re: Installation error: [Warning] strtotime() [function.strtotime]: Link to this post

    Hi,
    Thanks for your quick reply. This error seems like a compatibility bug in SS with Windows XP version of localhost XAMPP. SS 2.3.3. installed just fine on the most recent WampServer on the same system.

    I've created a ticket (http://open.silverstripe.com/ticket/4494)

    Regards,
    Sam

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Installation error: [Warning] strtotime() [function.strtotime]: Link to this post

    Err, I don't think so - you just need to set the php.ini setting as stated above.

  • jondbaker
    Avatar
    Community Member
    19 Posts

    Re: Installation error: [Warning] strtotime() [function.strtotime]: Link to this post

    EDIT: There seems to have been a conflict with some services running in IIS7. I went ahead and shut IIS down and was able to run a successful install using XAMPP. Cheers!

    Unforunately I'm running into the same problem on Windows 7. Here is the error from SS:

    [Warning] strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Denver' for '-7.0/no DST' instead
    POST /jonathandbaker/install.php

    Line 265 in D:\xampp\htdocs\jonathandbaker\sapphire\core\HTTP.php

    The code in my php.ini file reads:

    [Date]
    ; Defines the default timezone used by the date functions
    ; http://php.net/date.timezone
    date.timezone = 'America/Denver' => 'MST'

    7611 Views
Page: 1
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.