17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 729 Views |
-
Error on install

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.php80 * 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. -
Re: Error on install

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
-
Re: Error on install

24 November 2010 at 1:24pm Last edited: 24 November 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. -
Re: Error on install

24 November 2010 at 1:26pm Last edited: 24 November 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.iniTo 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 -
Re: Error on install

3 December 2010 at 10:18am Last edited: 3 December 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.
| 729 Views | ||
|
Page:
1
|
Go to Top |



