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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

multisites possible?


Go to End


107 Posts   35704 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

23 June 2009 at 1:05am

I'm quite sure that with the latest version of SS, those four files don't need mods.

Avatar
TWoSH

Community Member, 13 Posts

24 June 2009 at 7:44pm

Yes, it works!

1 hour ago, beginning from a fresh 2.3.2 installation and simply modifying /sapphire/core/model/Image.php on four places (replace all "../" with Director::baseFolder()."/") we have a working master-symlink environment with no issues so far. Images are uploaded, resampled and thumbnailed correctly.

So the recipe for using symlinks is;
1. Copy the silverstripe files to a master silverstripe directory; ex. "silverstripe232"
2. Don't install it :) (perhaps thats ok too?)
3. Copy assets, mysite, themes folders to another directory; ex. "mysymlinkedsite"
4. Set the correct rights to these folders
5. Create symlinks to the shared folders (saphhire, cms, etc.)
6. Create a "silverstripe-cache" folder in your "mysymlinkedsite"
7. Proceed with the installation as normal (by visiting e.g. localhost/mysymlinkedsite)
8. Enjoy (if I haven't forgotten anything... :)

Thanks to Uncle Cheese, JamesS and quamsta for helping us!

Tim

Avatar
quamsta

Community Member, 29 Posts

25 June 2009 at 9:42am

Great summary, TWoSH. I'm glad that this is solved. Now, I'm curious. Would it be appropriate to submit these changes to Image.php to the bug tracker? I'm not familiar with the protocol for that sort of thing, but I think it would be a worthy fix for the next release of SilverStripe.

Avatar
Willr

Forum Moderator, 5523 Posts

25 June 2009 at 6:09pm

TWoSH - I think thats a very valid change to the core which enables much more flexibility with users setup. You might like to submit this as a diff patch to open.silverstripe.org and would be great to have this information on the wiki.

Avatar
TWoSH

Community Member, 13 Posts

25 June 2009 at 6:49pm

Thanks guys!

willr - where do I start? :) I visited open.silverstripe.org but that link wasn't too helpful... :)

Regards,
Tim

Avatar
Willr

Forum Moderator, 5523 Posts

25 June 2009 at 6:57pm

Sorry we are currently moving open to a new server. When its back it will have links to submitting patchs etc

Avatar
martimiz

Forum Moderator, 1391 Posts

26 June 2009 at 1:41am

Great setup, thanks :-)

How would you guys go about installing modules. I guess by separate symlinks, so you could still easily add new modules to individual sites?

And how about patching or upgrading to a new version. Since Silverstripe versions are not always backwards compatible - would you create a new master and modules path, and then change the symlinks per site, in order to be able to check if everything works? That would be a lot of work still...

Or would you just change the existing code, and 'see what happens'?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

26 June 2009 at 2:09am

Unfortunately, you can't share modules. The bootstrap process in SS just won't follow the symlinks. The way we do that is with SVN. On a new site set up, we'll run something like

new_ss_site mysite.com dataobject_manager, swfupload, event_calendar

and all those modules get checked out into the vhost via SVN.