8098 Posts in 2087 Topics by 1161 members
Jump to:If this is your first visit, you will need to register before you can post. However, you can browse all messages below.
| Page: 1 | go to end | Reply | |
| Author | Topic: Running multiple websites using only one Sapphire library | 1078 views |

17 May 2008 at 7:15pm
i have a question about running multiple websites using only one sapphire library. It seems waste of space and inefficient to repeat copying the same code of sapphire library over and over for each website. However, i will keep the site specific folders such as tutorial or mysite and other folders will be kept seperately for each website. Of course, also a different database for each website.
But I would like to keep only one signle copy of sapphire framework or library. Please shed some lights on me about this issue. Thank you.
Regards,
landzin

18 May 2008 at 3:32am
if you have got shell access, you can use hardlinks ...
but not much of us (so do i) have this :..(

18 May 2008 at 4:06am
I think this feels like non-issue. The size of the sapphire library isn't that large (less than 3Mb) compared to the typical account qoutas on webservers. If there is such a need to save space, then maybe it's time to upgrade to a bigger account instead? Or maybe make a second?
This might be a solution though(haven't tested it):
* Make a local directory structure on which is the same as the one on your account.
* In that directory structure, make softlinks to the appropriate folders.
* Upload using FTP.
I'm not 100% shure FTP supports softlinks, and the server might not allow it. It might be worth a try though.

19 May 2008 at 1:05pm
I would recommend using symbolic links for this, on a unix/osx platform.
You could set up your file system like so:
/silverstripe
* /sapphire
* /cms
* /jsparty
/site1
* /mysite
* /themes
/site2
* /mysite
* /themes
And then create symlinks to the sapphire, cms and jsparty directories from within site1 and site2. Here is some shell script that will do that.
| 1078 views | |||
| go to top | Reply |