I have setup multi site, but i have few problems:
BTW, I am converting the existing site to multi site, so need to change the existing system accordingly.
1) I am sharing the users among the sites,
I took the backup of following tables and restored in shared database:
$db_prefix = array(
'default' => '',
'authmap' => 'site_shared.',
'role' => 'site_shared.',
'sessions' => 'site_shared.',
'users' => 'site_shared.',
);
I tried logging in both the sites, and work great. But i read an article that sequences table need to be shared also. How do i move the existing sequences objects to shared database? I cant see any tables called 'sequences' in the installation.
2) Images are not showing correctly. Pls check this thread:
http://drupal.org/node/664372
Thank you for the help.
Comments
Drupal 6 does not have a
Drupal 6 does not have a "sequences" table. That was a bizarre and slightly humiliating oddity unique to Drupal 5.
To fix the images problem, you may need to update the paths in the "files" table of the database. Basically, the paths to "sites/default/files/whatever.jpeg" need to be changed to link to "sites/example.org/files/whatever.jpeg". Check out this page for a quick tutorial on how to do a "find and replace" in MySQL.
The Boise Drupal Guy!
Garrett, Thank you for the
Garrett, Thank you for the clarification about sequences table. How does it work in D6? It is good to know that we can see and update the path in files table.
But what I did was(before I see your post), moved the site back to default location. So sites/all has my default site; and store..com will have the new subdomain site.
Now I have two more questions:
1) How do I share users table with store sub domain? Can i re-use the main site (users) without making changes to the table structure in main domain database.?
2) what tables to share for sharing Menu navigation?
I like to do it without touching the main site and database if possible.
Thanks,
Garrett, Thank you for the
It just uses the database system's standard sequencing for fields that need it. Kind of hard to explain it if you aren't familiar with DBMSes…
Can't help you so much with the questions about table sharing. Table sharing is something I never do personally, and generally do not recommend it.
The Boise Drupal Guy!
I thought table sharing was
I thought table sharing was the default/most commonly used way to share users across sites. Aside from Domain Access (which is vastly different), how else is it done?
Follow the example in settings.php
Your array should look something like that example.
So:
$db_prefix = array(
'default' => 'site1_',
'authmap' => 'shared_',
'role' => 'shared_',
'sessions' => 'shared_',
'users' => 'shared_',
);
for site1 and:
$db_prefix = array(
'default' => 'site2_',
'authmap' => 'shared_',
'role' => 'shared_',
'sessions' => 'shared_',
'users' => 'shared_',
);
for site2.
Examples given in Drupal documentation are generally pretty literal. I do some pretty huge and complex multisite installations using this technique and can verify that it works.
Hi Highermath, I did that way
Hi Highermath,
I did that way later, and it is working. Only difference is my default => '', i am not using prefix as I am using different database for these two sites. I hope it is okay.
How do i share menu (atleast primary and secondary memory).? Thanks,
I don't think there's a clean (easy) way...
using different dbs for certain tables is fine. I have 30+ sites hooked up in a star-ring type configuration as a result of sharing a few tables across all sites stored in a central db.
I think the most legit way of sharing a section of a table with another is to use the services module (it has a menu.get function) to return the menu items from one site and sync them up on another. I'll actually be doing this soon so that a user can flow across servers / sessions without knowing other then the address changing so that I can better cluster a site. You don't want to just share the menu_router and menu_links tables cause that could get dangerous.
It's not super straight forward cause you'll have to write a module to help but it's definitely the best option. Then write a small cron hook so that on cron run it syncs the menu's of one site with another via a push method with menu.get.
Ex Uno Plures
http://elmsln.org/
http://btopro.com/
http://drupal.psu.edu/