Jump to:

4952 Posts in 14419 Topics by 1491 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » (solved) Install stops with error message

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
Go to End
Author Topic: 3469 Views
  • Nessus
    Avatar
    Community Member
    6 Posts

    (solved) Install stops with error message Link to this post

    Hi,

    I just installed 2.4.1 on my lokal Suse 11.2 apache, mysql, php5 server.

    After having copied the files to the /srv/www/htdocs/silverstripe_test
    and met all the requirememnts i get the confirming message:

    You're ready to install! Please confirm the configuration options below

    When I press "Install" I get the error message

    [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 'Europe/Berlin' for 'CEST/2.0/DST' instead
    POST /silverstripe_test/install.php

    Line 89 in /srv/www/htdocs/silverstripe_test/sapphire/core/model/fieldtypes/Datetime.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.


    Trace

    * date(Y-m-d H:i:s)
    Line 89 of Datetime.php
    * SS_Datetime::now()
    Line 1023 of DataObject.php
    * DataObject->write()
    Line 1297 of SiteTree.php
    * SiteTree->requireDefaultRecords()
    Line 231 of DatabaseAdmin.php
    * DatabaseAdmin->doBuild(1)
    Line 1056 of install.php
    * Installer->install(Array)
    Line 201 of install.php

    When i act on the advice "If you receive a fatal error, refresh this page to continue the installation", I get back to the /install.php and a message reads

    Note: SilverStripe is already installed here.
    If you wish to reinstall SilverStripe, please delete the mysite/_config.php file first.

    When i call up http://localhost/silverstripe_test/ i get a friendly

    The requested page could not be found.

    Does anyone know, what i'm missing?

    Cheers for your help

    Nessus

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: (solved) Install stops with error message Link to this post

    I suggest opening your php.ini file and setting the date.timezone value to 'Europe/Berlin', then rebooting your web server and run the installer again, or run http://localhost/silverstripe_test/dev/build.

    It sounds like the installer got part way through building the database, then PHP threw a warning, which, since you're in dev mode, gets displayed and stops execution.

  • Nessus
    Avatar
    Community Member
    6 Posts

    Re: (solved) Install stops with error message Link to this post

    Hi Simon

    cheers for answering, looks like a good lead. I will try that tomorrow after work, though and report back then. Currently it's close to bedtime in my timezone and I had a few glasses of wine already, so i will refraim from trying that out right now ;-)

    Nessus

  • Nessus
    Avatar
    Community Member
    6 Posts

    Re: (solved) Install stops with error message Link to this post

    OK, finally found some time to try to test SilverStripe further.

    Well, it looks like the php.ini hint leads into the right direction. At least i found that a missing time-zone-entry caused some stir with more recent php-releases.

    Anyway, i was not able to get any further.... here is what i did:

    In /etc/php5/apache2/php.ini
    I tried to activate the date modus:


    ;;;;;;;;;;;;;;;;;;;
    ; Module Settings ;
    ;;;;;;;;;;;;;;;;;;;

    [Date]
    ; Defines the default timezone used by the date functions
    ; http://php.net/date.timezone
    date.timezone = "Europe/Berlin"
    date.timezone = 'Europe/Berlin'

    Note that i tried both versions of brackets seperately. The error message at the install-page remains the same.
    I'm not exactely a php-wizzard, so I might have made a "noob-syntax-error" somewhere.
    Does anyone see where i went wrong?

    Cheers

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: (solved) Install stops with error message Link to this post

    My particular entry's: date.timezone = Pacific/Auckland

    Also, you must restart Apache after changing the php.ini, or it wont read the changed settings.

  • Nessus
    Avatar
    Community Member
    6 Posts

    Re: (solved) Install stops with error message Link to this post

    Eureka, that was the solution, cheers ;-)

    I left out the apostrophes and the installation ran through.
    Now there still is some minor griping about "Friendly URLs are not working", but i think that i can configure that.

    Cheers again for pointing me into the right direction

  • Adizo
    Avatar
    Community Member
    12 Posts

    Re: (solved) Install stops with error message Link to this post

    This advise did not really work for me. I am trying to install Silver Stripe on Xampp 1.7.2 with php 5.3.0. but it gave the following error:

    [Warning] date() [function.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 'Europe/Paris' for '1.0/no DST' instead
    POST /silverstripe/install.php

    Line 89 in C:\xampp\htdocs\silverstripe\sapphire\core\model\fieldtypes\Datetime.php
    Source

    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.
    Trace

    date(Y-m-d H:i:s)
    Line 89 of Datetime.php
    SS_Datetime::now()
    Line 1023 of DataObject.php
    DataObject->write()
    Line 1297 of SiteTree.php
    SiteTree->requireDefaultRecords()
    Line 231 of DatabaseAdmin.php
    DatabaseAdmin->doBuild(1)
    Line 1056 of install.php
    Installer->install(Array)
    Line 201 of install.php

    Also when i checked my PHPinfo i moticed that the default timezone is Europe/Paris. I tried this but it still gave thesame error.
    Now i tried editing the php.ini file and restarted the server but it is still giving the same error message. Does anyone have solution
    to this problem please?

    Thanks.

  • mattclegg
    Avatar
    Community Member
    56 Posts

    Re: (solved) Install stops with error message Link to this post

    what date.timezone setting are you using then php.ini ?

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