CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Multisite support with on civicrm database
Pages: [1]

Author Topic: Multisite support with on civicrm database  (Read 7662 times)

Matthiasf

  • Guest
Multisite support with on civicrm database
August 17, 2008, 01:22:38 pm
Hi All!
I am struggeling to make this happen:
1 Drupal 5.7 installation with separate database, let´s call it www.abc.xxx
1 Drupal 5.7 installation with separate database, let´s call it www.xyz.xxx
1 civicrm 2.05 installation with seperate database, supposed to keep contacts for www.abc.xxx and www.xyz.xxx

I made sure, that the civicrm.settings.php in the indiviuals sites/defaults/ sections of the two installations are identical, and only deferr when it comes to the

define( 'CIVICRM_UF_DSN'.... statement, which obviously has to point to the databases of www.abc.xxx and www.xyz.xxx


So it works fine, with one Drupal installation, let´s say with www.abc.com. I can set all the settings in the Global settings section the way I want. I can also find existing contacts and copy them from the drupal database into the civicrm-Database. I can set the suffix of the database, which is ABC.
Then I go to the second installation. It opens, but shows an error at the browser buttom line. I can go to the global settings section, and then I start to struggle. Obviously I want all users pictures in one directory, not individual on each related installation. Secondly I am struggeling how to set the suffix, which for the second installation is XYZ. When I do so, still no contact can be found within the second installations database.

The error message while loading each page on www.xyz.xxx on the bottom line of the browser disappears, when I set the CIVICRM Ressource URL to the www.xyz.xxx/sites/all/modules/civicrm/

My problem is: since the value of this ressources URL is stored in the civicrm-database in table userFrameworkResourceURL, so how can this database serve two installations? Or am I walking into the wron direction?
I was searching in the installations manual, but I am sorry to say, this was not really helpfull. There is a line mentioned supposed to be fnd in the Drupal setting.php, saying
$db_url[CRM:'civicrm'] = 'mysql://.............user:pswd@domain/databasename';
This cannot be found in any of my two Drupal settings.php. Does it mean, that this line with the related information for user, pswd, domain and databasename needs to be added to the settings.php?

Any help would be highly appreciated, because I am really stuck.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Multisite support with on civicrm database
August 17, 2008, 10:00:58 pm

We've not had the request for the below in a long time. Thinking a bit on this, i'm pretty sure that CiviCRM v2.x does not support the multisite configuration with one civicrm database. We've moved to storing most of the config variable in the db, which messes up with the different site urls etc

I suspect fixing this is not too hard, but will require some fairly significant changes/hack to the core config code. For now, i'd advise you to avoid this configuration. I'll fix the relevant wiki documentation

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Matthiasf

  • Guest
Re: Multisite support with on civicrm database
August 20, 2008, 08:04:51 am
 :(
That are really bad news, because this was the main reason why I went away from the Drupal profiles section to CIVICRM, since I thought it would be very nice to have the members of the two sites in one db, while the two insome way different, in some way very similar contents are located in two other installations.

Any idea, when this id going to be fixed, if at all?

geilhufe

  • I post frequently
  • ***
  • Posts: 293
  • Karma: 33
    • Social Source Software
Re: Multisite support with on civicrm database
August 20, 2008, 11:18:53 am
Bummer, that destroys plans I had for a civicrm install as well (two different drupal websites sharing the same civicrm database). :(

Drupal and CiviCRM consulting, strategy and configuration
http://www.social-source.com/

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Multisite support with on civicrm database
August 20, 2008, 03:07:40 pm

At this stage we are not sure if we will reintroduce this feature and enable multiple sites to share the same civicrm db

if this is essential to you, you might want to consider sponsoring this feature for the 2.2 release

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

davem

  • I post occasionally
  • **
  • Posts: 60
  • Karma: 0
    • Circle Interactive
  • CiviCRM version: 3s and 4s
  • CMS version: D6, D7, J!, WP
Re: Multisite support with on civicrm database
October 08, 2008, 04:26:47 am
I also have a plan for several drupals to all share a single civi database. It's probably too late for us to get the sponsorship sorted for 2.2 but I'd like to know how big a job this is so we can arrange for the funding for 2.3

geilhufe

  • I post frequently
  • ***
  • Posts: 293
  • Karma: 33
    • Social Source Software
Re: Multisite support with on civicrm database
October 08, 2008, 11:43:15 pm
I know we moved the settings file into the database... that was a good thing.

Any way we can allow "special cases" like multi-site drupal installs to override the database values with a settings file? That way experts can basically take responsibility for constructing their settings file correctly and the vast majority of users can bask in the warm glow of usability provided by settings in the database.

Or is the actual construction of the system now such that you cannot have two instances of drupal point at the same civicrm db? P.S. the original way we did this assumed that the two instances of drupal would share the same users table, which allows CiviCRM to get what it expects... a single user table.
Drupal and CiviCRM consulting, strategy and configuration
http://www.social-source.com/

davem

  • I post occasionally
  • **
  • Posts: 60
  • Karma: 0
    • Circle Interactive
  • CiviCRM version: 3s and 4s
  • CMS version: D6, D7, J!, WP
Re: Multisite support with on civicrm database
October 09, 2008, 05:59:39 am
The "special cases" override would be a fine solution here. We're certainly responsible enough to get settings done properly if not as expert as many folks here.

The case I have in mind would also want to take advantage of the multi-org features that should be coming out in 2.2 from the USPIRG project. So the idea is to have 3 levels of users: L1 manage the whole civi install, view management reports and can set up new L2 users/orgs etc. These L2 users then manage their own separate drupals and parts of the civi db but can only see their own contacts etc. (although it would be useful if they can share a contact with another L2 org). L3 users keep their details up to date and probably run their own organic groups on drupal. Is that going to be a nightmare of different user tables?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Multisite support with on civicrm database
October 09, 2008, 07:28:03 am

This will need to be a sponsored or community contributed project. If i had to guess, restructuring the code to handle this will be between 100-200 hours of work. This will be part of core and hence supported / upgraded / QA'ed for follow on releases, which the above hours include. Consulting rates and contract on the wiki at:  http://wiki.civicrm.org/confluence/display/CRM/Consulting+Services+Agreement

The multi-org features coming in for PIRG are quite undefined. We expect most of them to be taken care of via "custom PIRG specific" acl hooks, so except for the mailing aspects, i do not expect a lot of multi-org features to appear in 2.2

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

davem

  • I post occasionally
  • **
  • Posts: 60
  • Karma: 0
    • Circle Interactive
  • CiviCRM version: 3s and 4s
  • CMS version: D6, D7, J!, WP
Re: Multisite support with on civicrm database
October 09, 2008, 09:00:53 am
OK we'll work on getting spec and funding together for this for 2.3

Quote
The multi-org features coming in for PIRG are quite undefined. We expect most of them to be taken care of via "custom PIRG specific" acl hooks, so except for the mailing aspects, i do not expect a lot of multi-org features to appear in 2.2

Would it be possible to get some of PIRG-specific hooks to be more generalised in 2.2? This is definitely something that would be of value to many voluntary sector orgs in UK where in many larger cities there is a ChangeUp Consortium or similar made up of many Local Infrastructure Organisations. There would be benefits all round if consortia could pull out management reports from across their whole area while LIOs all worked with the same system and could share experiences as well as some data. Most of the LIO client organisations are local to them but some stretch across their boundaries, like a city wide cycling network or faith group.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Multisite support with on civicrm database
October 09, 2008, 11:39:35 am
Quote from: davem on October 09, 2008, 09:00:53 am
Would it be possible to get some of PIRG-specific hooks to be more generalised in 2.2? This is definitely something that would be of value to many voluntary sector orgs in UK where in many larger cities there is a ChangeUp Consortium or similar made up of many Local Infrastructure Organisations. There would be benefits all round if consortia could pull out management reports from across their whole area while LIOs all worked with the same system and could share experiences as well as some data. Most of the LIO client organisations are local to them but some stretch across their boundaries, like a city wide cycling network or faith group.

an hook implementaion by definition is custom :) based on the few we've done so far (HRD, Greens and USPIRG) each org has a few specific needs and ways of structuring things and so hooks seem significantly better. They are much more scalable also (compared to the current model)

Once we are done with PIRG implementation, we'll see if we can generalize stuff. The code will be public and under AGPL etc

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ronald

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 5
Re: Multisite support with on civicrm database
October 09, 2008, 10:43:11 pm
Thinking about the original simple case again, allowing multiple Drupal installs to work with identical CiviCRM data:
could that be achieved by falling back to the config file if/when retrieving the URL from the database returns some defined value (which could be NULL, or something else)? Or do I miss something?
If that is feasible, how many hours approximately would it take to implement?

(A more generic implementation of that mechanism might allow for other values as well to be configured through the config file, i.e. per site, where appropriate.)
« Last Edit: October 09, 2008, 10:49:16 pm by ronald »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Multisite support with on civicrm database
October 10, 2008, 06:59:09 am

2.2 will support relative URL's which will allow multiple Drupal sites to access the same CiviCRM db (assuming shared user table for the drupal db). The code for this is already in trunk

i'm not sure what we will do for paypal standard / google checkout in this case, since they need absolute urls. We'll figure it out before the release

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ronald

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 5
Re: Multisite support with on civicrm database
October 10, 2008, 07:51:48 am
Great, thanks Lobo.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Multisite support with on civicrm database

This forum was archived on 2017-11-26.