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

Installation error: [Warning] strtotime() [function.strtotime]:


Go to End


5 Posts   10287 Views

Avatar
Happysadhu

Community Member, 33 Posts

15 August 2009 at 12:02pm

Edited: 15/08/2009 12:04pm

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

Avatar
Hamish

Community Member, 712 Posts

15 August 2009 at 12:50pm

Edited: 15/08/2009 12:51pm

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

Avatar
Happysadhu

Community Member, 33 Posts

16 August 2009 at 5:36am

Edited: 16/08/2009 6:14am

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

Avatar
Hamish

Community Member, 712 Posts

16 August 2009 at 5:06pm

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

Avatar
jondbaker

Community Member, 19 Posts

30 November 2009 at 8:28pm

Edited: 01/12/2009 6:17am

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'