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

Error on install


Go to End


5 Posts   2308 Views

Avatar
cruzer45

Community Member, 9 Posts

16 November 2010 at 5:37am

Hi guys... I'm getting the following error when I try to install SS the error is below.
Let me know what you think.

[Warning] date(): 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/Chicago' for '-6.0/no DST' instead
POST /mr/install.php

80 	 * Returns either the current system date as determined
81 	 * by date(), or a mocked date through {@link set_mock_now()}.
82 	 * 
83 	 * @return SS_Datetime
84 	 */
85 	static function now() {
86 		if(self::$mock_now) {
87 			return self::$mock_now;
88 		} else {
89 			return DBField::create('SS_Datetime', date('Y-m-d H:i:s'));
90 		}
91 	}
92 	
93 	/**
94 	 * Mock the system date temporarily, which is useful for time-based unit testing.
95 	 * Use {@link clear_mock_now()} to revert to the current system date.

Avatar
Sean

Forum Moderator, 922 Posts

16 November 2010 at 7:20pm

Hi cruzer45,

You need to edit your php.ini file in the local PHP installation, and look for "date.timezone". Uncomment it by removing the semi-colon in front of it and make it look like this:

date.timezone = America/Chicago

Once you've done that, restart the web server and try the SilverStripe installation again. It should work this time around.

Sean

Avatar
samu

Community Member, 1 Post

24 November 2010 at 1:24pm

Edited: 24/11/2010 1:24pm

How do you handle that error on OS X? There's no php.ini at all. I added php.ini to /usr/local/lib/, with a line

date.timezone = Pacific/Auckland

then restarted the web server, with no luck.

Avatar
Sean

Forum Moderator, 922 Posts

24 November 2010 at 1:26pm

Edited: 24/11/2010 1:29pm

samu: Run this command in Terminal to find which php.ini file is loaded:

php -i | grep php.ini

Output should look something like this:

Configuration File (php.ini) Path => /opt/local/etc/php5
Loaded Configuration File => /opt/local/etc/php5/php.ini

To confirm the date.timezone is being loaded correctly, Run this:

php -i | grep date.timezone

Output for that should look like this:

date.timezone => Pacific/Auckland => Pacific/Auckland

This is assuming the "php" command in the command line is the same one Apache is using.
In my case, I'm using MacPorts to manage my Apache, PHP and MySQL stack.

Cheers,
Sean

Avatar
cruzer45

Community Member, 9 Posts

3 December 2010 at 10:18am

Edited: 03/12/2010 10:23am

Thanks guys.

As an alternative I did the following :

Add the following line to index.php and sapphire/main.php

date_default_timezone_set("America/Belize"); 

That is a workaround if you don't have the ability to restart your webserver.