Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to configure for Multiple DBs and Instance IDs? #53

Open
Nashable opened this issue Jan 29, 2013 · 6 comments
Open

Possible to configure for Multiple DBs and Instance IDs? #53

Nashable opened this issue Jan 29, 2013 · 6 comments

Comments

@Nashable
Copy link

Wondering if that is possible without having to replicate the install?

@wriley
Copy link
Collaborator

wriley commented Jan 29, 2013

That's not possible right now but something that is on my personal TODO list. I run 3 servers and it would be nice to be able to switch between the instances at will.

@Nashable
Copy link
Author

How are you managing that today? Is it easy to configure the location of the assets (which make up the majority of the install). I was thinking of having a common directory with all the images in and then just keep the server specific code/config in a single directory.

@wriley
Copy link
Collaborator

wriley commented Jan 29, 2013

I maintain copies of config.php for my servers and just copy in the one I want as needed. Painful but effective.

@p-schneider
Copy link

I have multiple virtual directories in my webserver all pointing to the same BlissAdmin directory on the hard drive.
My config.php has this block at the end (after defining all the values for one of my servers)

if(substr($_SERVER["SCRIPT_URL"],0,18)=="/BlissAdminNamalsk")
{
    $iid = "8";
    $serverport = 2403;
    $world = "8";
    $sitename = "BlissAdmin: Namalsk";
    $map = "namalsk";
}

This block overrides the values that are different for namalsk compared to the first server which i defined in the variables at the beginning of the file.
I can maintain one BlissAdmin folder and I only need to git pull once each time there are new changes.

@wriley
Copy link
Collaborator

wriley commented Jan 29, 2013

p-schneider that's a neat solution (but might be too technical for the average BlissAdmin user). I haven't written a line of code yet but in my mind I see $config turning into an array or arrays and a drop down menu in the UI to select between the configs.

@Saiboogu
Copy link

Saiboogu commented Feb 2, 2013

That is a good fix p-schneider, though I think your substr command is really specific to your URL. I use a more general stristr --

if(stristr($_SERVER["SCRIPT_URL"],"namalsk"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants