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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

SS Install Behavior


Go to End


2 Posts   902 Views

Avatar
mahalay

Community Member, 1 Post

11 June 2013 at 3:30am

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.

Avatar
Willr

Forum Moderator, 5523 Posts

15 June 2013 at 8:34pm

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