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) »
  • Is it possible to isntall N sites with separate CiviCRM databases?
Pages: [1] 2

Author Topic: Is it possible to isntall N sites with separate CiviCRM databases?  (Read 3351 times)

refinej

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7
  • MySQL version: 5.1.61
  • PHP version: 5.3
Is it possible to isntall N sites with separate CiviCRM databases?
April 19, 2012, 02:46:23 pm
I have a number of sites on one server but don't want to use one CiviCRM database as they won't be sharing the same data.

Is this possible?  If so, are there guidelines I can follow?

Have found install for N sites with one CiviCRM database.

So far attempts to set this up in D7 with latest version of CiviCRM just displays "page not found".

Step 1: Clean install of Drupal 7
Step 2: Install of CiviCRM

Many thanks
Jenifer

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Is it possible to isntall N sites with separate CiviCRM databases?
April 20, 2012, 02:55:41 am
Yes, you can do this using a Drupal multisite setup. Is that what you have for your Drupal sites?

When you install CiviCRM, did you use the install procedure here: http://wiki.civicrm.org/confluence/display/CRMDOC41/Drupal+Installation+Guide+for+CiviCRM+4.1+-+Drupal+7 ?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

refinej

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7
  • MySQL version: 5.1.61
  • PHP version: 5.3
Re: Is it possible to isntall N sites with separate CiviCRM databases?
April 21, 2012, 05:13:29 am
Yes I have a Drupal multisite setup and followed the install procedure for CiviCRM. 

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Is it possible to isntall N sites with separate CiviCRM databases?
April 21, 2012, 12:00:46 pm
Do you have a site in sites/default ? Is there a civicrm.settings.php file there?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

refinej

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7
  • MySQL version: 5.1.61
  • PHP version: 5.3
Re: Is it possible to isntall N sites with separate CiviCRM databases?
April 22, 2012, 03:50:42 am
Yes I do.

Sites defaault directory contains:
     civicrm.settings.php
     default.settings.php
     settings.php

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Is it possible to isntall N sites with separate CiviCRM databases?
April 22, 2012, 08:38:39 am
Is the CiviCRM module enabled? If not, enable it. If yes, disable it and then re-enable it.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

refinej

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7
  • MySQL version: 5.1.61
  • PHP version: 5.3
Re: Is it possible to isntall N sites with separate CiviCRM databases?
April 22, 2012, 10:22:52 am
Yes civiCRM is enabled and I've been using it.  Will disabling it cause data loss?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Is it possible to isntall N sites with separate CiviCRM databases?
April 22, 2012, 10:27:14 am
Won't cause any data loss, no.

But if you have been using it, then why did it break? Can you explain in more detail what you had before, what you did now and what precisely doesn't work?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Is it possible to isntall N sites with separate CiviCRM databases?
April 23, 2012, 01:33:13 pm
I'm having a similar problem:

Multi-site install, Drupal 7, latest version of Civicrm.

Drupal and Civicrm are installed and working perfectly on one site (the main site). 

We set up a multi-site install (the primary site has a Drupal and Civicrm database, and I set up separate Drupal and Civicrm databases for the second site).

Drupal is working on the second domain (located in the "sites" directory).

When I enable Civicrm (which is already installed because it's sharing the codebase with the primary site), I get the following error:

Quote
Initialization Error

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => simpleHandler
            )

       
Code: [Select]
=> -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] => SELECT *,  config_backend, locales, locale_custom_strings 
 FROM civicrm_domain
 
 WHERE (  civicrm_domain.id = 1 ) 
 
 
 
 [nativecode=1146 ** Table 'vsource4_edboost_civicrm.civicrm_domain' doesn't exist]
    [type] => DB_Error
    [user_info] => SELECT *,  config_backend, locales, locale_custom_strings 
 FROM civicrm_domain
 
 WHERE (  civicrm_domain.id = 1 )  [/quote]

I know that the database exists, I can see it in my control panel.  And, I copied the civicrm.settings.php file from the other site and just changed the domain name.  I think I must have skipped a step.

Is there something I need to do to initialize the database? 

I'm following instructions here: http://wiki.civicrm.org/confluence/display/CRMDOC40/CiviCRM+for+Drupal+-+Configure+Multi-site+Installations#CiviCRMforDrupal-ConfigureMulti-siteInstallations-Multi-siteInstallationOptions

Thanks for any help!

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Is it possible to isntall N sites with separate CiviCRM databases?
April 23, 2012, 02:10:36 pm
Ok, I solved my own question.  RefineJ, I'm not sure if it will help with yours.

The directions on the Wiki were a little unclear.  It read to me as if I could just put the settings.civicrm.php file in the new sites's directory, enable the module, which already showed up, and it would work. 

But, what actually did work was installing Civicrm in the new domain using:

http://[newdomainname]/sites/all/modules/civicrm/install/index.php

This made me nervous, as I was worried that it might erase data that I had on the main installation on the main site.  It did not.  I just set up the new install (from the installation page) and pointed it to the new drupal and civicrm databases that I had created. 

I now how civicrm functioning with my prior data on the orginal site and blank and ready to go on the new subdomain,

Hope that helps.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Is it possible to isntall N sites with separate CiviCRM databases?
April 24, 2012, 03:24:46 am
Quote from: Tiffani Chin on April 23, 2012, 02:10:36 pm
The directions on the Wiki were a little unclear.  It read to me as if I could just put the settings.civicrm.php file in the new sites's directory, enable the module, which already showed up, and it would work. 

Well that can work for a multi-org install (which is different than multisite). Which wiki page is this?

Quote from: Tiffani Chin on April 23, 2012, 02:10:36 pm
This made me nervous, as I was worried that it might erase data that I had on the main installation on the main site.  It did not.  I just set up the new install (from the installation page) and pointed it to the new drupal and civicrm databases that I had created. 

Interesting--you are not the only person with this concern. The installer will never erase data actually. Perhaps we should add a note to that effect...
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Is it possible to isntall N sites with separate CiviCRM databases?
April 24, 2012, 09:53:03 am
Hershel,

I was using this wiki page:
http://wiki.civicrm.org/confluence/display/CRMDOC40/CiviCRM+for+Drupal+-+Configure+Multi-site+Installations

I think part of the confusion comes in because the page talks about both multi-site and multi-org configurations in each section -- which makes sense because there are so many different configurations possible and then sub configurations there.  But, within any particular configuration (e.g, "Shared codebase, separate content and contacts") it discusses a multi-site install and then a multi-org install, so you have to read very carefully to make sure you are following the instructions for the particular configuration that you're going for.

But, I am was also confused because the wiki had me copying the settings.civicrm.php file to the new domain directory and changing the database settings but I think that the installer.php actually created a properly configured settings.civicrm.php file for me (I had to rename the settings.civicrm.php file that I had modified in order to get the installer to run).   Is that true?

I would be happy to take a crack at trying to clarify the wiki -- but certainly don't want to muck around anywhere I'm not qualified to be!  Please let me know if it would be useful for me to try.  I'm definitely more qualified to contribute to this project in terms of writing than in terms of programming (but that's not saying much)!

Thanks! -tiffani


Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Is it possible to isntall N sites with separate CiviCRM databases?
April 24, 2012, 10:44:22 am
Yes, I see what you mean. In a nutshell:

Drupal multi-site (in the simplest implementation) means that you have sites/cat.com and sites/dog.com and each has a unique settings.php and a unique database and the sites are unique, except that they share the same Drupal codebase. To add CiviCRM to such a setup, you can do what you did, i.e. by visiting each of these separately:

http://dog.com/sites/all/modules/civicrm/install/index.php
http://cat.com/sites/all/modules/civicrm/install/index.php

and that will most probably install CiviCRM correctly into each of sites/cat.com and sites/dog.com and each would need a unique database. This means that the CiviCRM data of cats has no connection to any of the data about dogs.

CiviCRM multi-org means you start off with a Drupal multi-site as above, and then install CiviCRM into cat.com, but then for dog.com, you don't install CiviCRM. You copy civicrm.settings.php from sites/cat.com to sites/dog.com and then you edit that new file which is sites/dog.com/civicrm.settings.php and you change the directories, meaning the lines starting with

Code: [Select]
$civicrm_root = ...
define( 'CIVICRM_TEMPLATE_COMPILEDIR', ...

You adjust those to refer to sites/dog.com instead of sites/cat.com. Then you edit the line starting:

Code: [Select]
define( 'CIVICRM_UF_BASEURL'   
And then you just enable CiviCRM from the regular Drupal modules page. So now you have two unique sites that both connect to the same CiviCRM database. This will cause problems if you stop there, however.

Now you must enable and define the multiorg settings. Those are steps 1, 2, 6, 8, 9 here: http://wiki.civicrm.org/confluence/display/CRMDOC41/Multi+Site+Installation

I'm not sure if step 3 is necessary or not.

I see now that you were looking at a different page, which is more outdated than the page I just posted.

Anyhow, have a look at these and let me know what you think.

Quote from: Tiffani Chin on April 24, 2012, 09:53:03 am
I would be happy to take a crack at trying to clarify the wiki -- but certainly don't want to muck around anywhere I'm not qualified to be!  Please let me know if it would be useful for me to try.

Yes, that would be great. We are always happy for more people to become involved. This I think is a perfect way for you to contribute--I believe you have a background in education. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Is it possible to isntall N sites with separate CiviCRM databases?
May 01, 2012, 02:21:45 pm
Hershel,

Finally have a few moments to take a crack at the installation wiki and have a question for you:

You use this page: http://wiki.civicrm.org/confluence/display/CRMDOC41/Multi+Site+Installation

But that page specifically refers to N sites and 1 database.

I (and the original poster of this thread) wanted two sites, same codebase, different databases, which is why I followed this page: http://wiki.civicrm.org/confluence/display/CRMDOC40/CiviCRM+for+Drupal+-+Configure+Multi-site+Installations

I see that your page is tagged for 41 and the one I used for 40.  What's the best way to proceed?  Add to the page you linked to with instructions for instructions for a multi-database case?  Or, add another page?  Or ...

From my perspective, I would have loved to have separate pages for each general configuration type. But, it looks like the wiki pages lean towards consolidation.

Or -- is there a wiki on how to write on the wiki?  I know that there are strict guidelines for coding.

Thanks for your help,
-tiffani

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Is it possible to isntall N sites with separate CiviCRM databases?
May 02, 2012, 05:40:51 am
I see what you mean. Seems to me the best would be to take the existing page in the 4.1 space http://wiki.civicrm.org/confluence/display/CRMDOC41/Multi+Site+Installation and rewrite it to give an overview of the different options (as that 4.0 page has) and then details (as much as you have) for how to setup each.

I would say just do it as you feel is logical. Perhaps subpages for the options, or just make one big page and we can also look at it after and see if subpages are warranted.

> Or -- is there a wiki on how to write on the wiki? 

Not that I know of.

> I know that there are strict guidelines for coding.

That's for coding. Here it's for documentation and I don't think we have much in the way of guidelines.

The main thing is to make it as clear as possible for users to read and understand. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Is it possible to isntall N sites with separate CiviCRM databases?

This forum was archived on 2017-11-26.