Jump to:

4937 Posts in 16240 Topics by 1489 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » SS Install Behavior

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: 386 Views
  • mahalay
    Avatar
    Community Member
    1 Post

    SS Install Behavior Link to this post

    Hello Everyone,

    I've been struggling to install SS for about a day already... It seems that the install wizard doesn't work quite well with _ss_environment.php file. Specifically, the install wizard doesn't seem to recognize the constants "SS_DATABASE_SUFFIX" and "SS_DATABASE_PREFIX".

    To elaborate on the issue, assuming my DB is named "ABC_foo_123" and I set SS_DATABASE_PREFIX and SS_DATABASE_SUFFIX with "ABC_" and "_123" respectively therefore leaving "foo" as the database name... if I use "foo" as the DB name, clicking "re-check requirements" button will result to an error stating that the DB doesn't exist. If I enter "ABC_foo_123" as the DB name, clicking "re-check requirements" will result to an "All requirements pass" status. However, if I click "Install Silverstripe", the next page will throw an error stating that "ABC_ABC_foo_123_123" DB does not exist.

    Lastly, if I can set the DB host, username, password in _ss_environment.php file, why can't I define the DB name? I wonder what was the design consideration for not allowing the DB name to be defined.

    FYI, I have followed this: http://doc.silverstripe.org/framework/en/topics/environment-management

    I hope somebody can shed some light on this issue.

    Thanks in advance, and kind regards to everybody.

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: SS Install Behavior Link to this post

    The installer is normally for people who have never set SS up before, whereas people who know to have an _ss_environment usually bypass the installer, suffix / prefix should work so raise it as an issue on github (check 3.1's installer first!)

    You can define the DB name in the _ss_environment if you want, nothing to stop you. Infact, this is what we do on a lot of sites as prod name is different to staging. I change my config.php to something like

    global $database;
    $database = (defined('SS_DATABASE_NAME')) ? SS_DATABASE_NAME : "ss_sitename";

    Then on production I define SS_DATABASE_NAME in the _environment, in other environments I fall back to ss_sitename (dev, uat environments).

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