Open timkelty opened 13 years ago
Hi Tim,
Actually, the reason we wrote this addon was to solve a portability issue with an MSM site. I have it running on three MSM sites at the moment, all which seem ok. What problems are you experiencing?
For example (and maybe the only issue): Line 85:
//now let's check if this CMS knows which environment we're using
$results = $this->EE->db->query("SELECT server_path FROM exp_upload_prefs LIMIT 0,1");
Should you be only checking server path for the current site? I think my problem is, since I have different virtual host for each site, they actually have a different docroot: (e.g. /home/USER/apps/barfly/dev/current/sites/site_a/public/ vs /home/barfly/apps/barfly/dev/current/sites/site_b/public/). So I think what was happening was my first upload dest happen to be for site_b, and I was logged in under site_a, so it didn't find a match.
Make any sense?
Yep, makes complete sense. We hadn't considered a case whereby the Document Root would be changing.
As it stands, this version of Greeny isn't for you. However, I'm keen to improve it and the weekend is upon us! I think I should be able to simulate your situation in Mamp and adjust the addon to roll with your scenario. Once I've implemented the changes, I'll post a pre-beta release in this thread for you to test it. If you could just let me know if it's done the job or not, it would be appreciated.
Thanks for the heads up on this issue. I'll be in touch again shortly.
Absolutely. Let me know if you need any help setting up your text environment.
Actually, I have one query - using your example above, at what level does your "system" directory sit? Or is it you have 2 (on for each site).
All my sites are set up with one system folder above webroot, and a masked CP for each site. Web root for each site is [public].
[config] [system] [sites] ----[site-a] ---------[public] -------------[cp] ----------------index.php -------------index.php ---[site-b] ---------[public] -------------[cp] ----------------index.php -------------index.php
Therefore, when I set my system dir in index.php, it looks like this:
$system_path = $_SERVER['DOCUMENT_ROOT'] . "/../../../system/";
Thanks Tim, your setup isn't quite what I expected but it looks like a good way to run an MSM site. I'm curious about your config dir - have you pulled this outside of your system/expressionengine directory or are you using a bootstrap in this location?
http://skitch.com/timkelty/fw4im/msm-setup
We use a setup similar to NSM bootstrap. We roll our own so it's a lil different, but same basic idea. So our system/expressionengine config/database.php are requiring that top level config.
Ok, I might try simulate it just using Newism's bootstrap as we're more familiar with that. Give me a day or so to get up to speed with a couple of jobs and then I'll post back here with what I've figured out.
Great. I've been setting up All my sites like this (not just MSM) for some time now, and seems to work really well. Let me know if you run into any snags.
Any plan to make this MSM friendly?
Upon first try, didn't seem to play nice.