Drupal: .htaccess Access Deny
August 21, 2014 – 7:59 am | No Comment

In this article I will tell how to forbid access to certain resources for some clients. The instructions will include descriptions of different directives.

Read the full story »
CSS Templates

Contain reviews and news about CSS Templates.

Freebies

Contain freebies such as icons, graphics, headers and images for your websites.

Fun Stuff

Contains other fun stuff for entertainment or interesting site showcase.

How-To

Contain technical elaborations on some specific workarounds or common tweak.

Joomla Templates

Contains reviews and news about Joomla templates.

Home » How-To

Drupal: Multisiting with Shared Tables

Submitted by on December 1, 2010 – 9:11 amNo Comment

This article would be the first in the cycle of articles related to multisiting. Here, I would tell you how to create a few sites with shared tables in database.

You could meet some problems if setting the second site in multisiting with shared tables in D6 and D7. Installer would give an error when meet shared tables.

Solutions

  • Set multisiting with shared tables in Drupal 6 and 7
  • Set multisiting with shared tables in Drupal 5

Set multisiting with shared tables in Drupal 6 and 7

The first site

  1. Specify a line with data necessary for connection to a database
  2. Specify tables’ prefixes before installation
  3. Install Drupal as usual

All further sites

  1. Specify a line with data necessary for connection to a database
  2. Do NOT specify tables’ prefixes before installation
  3. Install Drupal without tables’ prefixes
  4. Install tables’ prefixes after installation
  5. Remove shared tables

Here is the template of sql-request for removing the tables (remove tables you wish to be in the database from this code):

DROP TABLE `term_data`,
`term_hierarchy`,
`term_relation`,
`term_synonym`,
`vocabulary`,
`vocabulary_node_types`,
`aggregator_category`,
`aggregator_category_feed`,
`aggregator_category_item`,
`aggregator_feed`,
`aggregator_item`,
`book`,
`comments`,
`contact`,
`file_revisions`,
`files`,
`files_backup`,
`files_tmp`,
`forum`,
`history`,
`locales_meta`,
`locales_source`,
`locales_target`,
`node`,
`node_accesaggregator_category`,
`node_access`,
`node_comment_statistics`,
`node_counter`,
`node_revisions`,
`node_type`,
`old_revisions`,
`poll`,
`poll_choices`,
`poll_votes`,
`search_dataset`,
`search_index`,
`search_total`,
`term_node`,
`url_alias`,
`access`,
`authmap`,
`profile_fields`,
`profile_values`,
`sessions`,
`users`,
`filter_formats`,
`filters`,
`permission`,
`role`,
`users_roles`;

You may also need this table for Drupal 5 (Drupal 6 has no such table):

DROP TABLE `sequences`;

If you’ll remove unnecessary tables you have to begin from the step 2.

Set multisiting with shared tables in Drupal 5

In Drupal 5, the following steps are sufficient for all installations:

  1. Specify a line with data necessary for connection to a database
  2. Specify tables’ prefixes before installation
  3. Install Drupal as usual ignoring alert that the tables already exist.

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.