Problem configuring multisite drupal on Dreamhost
Right, I've started getting this up and running for 2 different domains. I want each site to have it's own database and I want both to share the drupal codebase.
I've installed drupal 5 into one of the domain folders (www.lightbeingcreations.co.uk) and when I go there I get the drupal front page so that's working. Now I'd like one more domain (www.lightbeingcreations.org) to share that codebase but to have it's own database. Both these domains share the same Dreamhost FTP user.
Within my Dreamhost controls I've got the web directory for the second domain (www.lightbeingcreations.org) pointing to the directory where the first domain is located, ie "/home/username/lightbeingcreations.co.uk"
Within the sites directory of my drupal install I've got a directory called lightbeingcreations.org with it's own setting.php file and in fact when you view that site you can see that file listed but not drupal site shows.
What do I need to do to get it working?

It looks like you have the
It looks like you have the root directory for www.lightbeingcreations.org pointing to the wrong place. It should point the to same directory as www.lightbeingcreations.co.uk.
I've just changed
I've just changed lightbeingcreations.org to point to the same directory as the other domain and now get loads of errors:
Warning: Table 'drupal_lbc_org.access' doesn't exist query: SELECT CASE WHEN status=1 THEN 0 ELSE 1 END FROM access WHERE type = 'host' AND LOWER('82.33.66.118') LIKE LOWER(mask) ORDER BY status DESC LIMIT 0, 1 in /home/.krone/dubber/lightbeingcreations.co.uk/includes/database.mysql.inc on line 167
Warning: Table 'drupal_lbc_org.users' doesn't exist query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = 'eabb4f3a7e45e5382766c18d8793968f' in /home/.krone/dubber/lightbeingcreations.co.uk/includes/database.mysql.inc on line 167
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/.krone/dubber/lightbeingcreations.co.uk/includes/database.mysql.inc:167) in /home/.krone/dubber/lightbeingcreations.co.uk/includes/bootstrap.inc on line 811
Warning: Table 'drupal_lbc_org.cache' doesn't exist query: SELECT data, created, headers, expire FROM cache WHERE cid = 'variables' in /home/.krone/dubber/lightbeingcreations.co.uk/includes/database.mysql.inc on line 167
And it goes on like that for ages!!!
There is a seperate MySQL database setup for the 2 domains but I'm wondering if those erros means it thinks there is just one table with some missing tables?
It looks like it's
It looks like it's complaining about a single column, but I've not seen this error before. I'd drop and readd that database and make sure you use the correct mysql version file when you create the db. Then, double check your settings.php file.
Deleted the database and
Deleted the database and created again (but with a slightly different name and still getting errors.
If I change the settings.php file to point to the same database for both domains then they both are working off the one database but changes to one site are replicated across the other, which I don't want.
What I want to be able to do is have 2 domains each with their own website running off one codebase. They can either have their own database or a single one, I don't mind which, so long as the websites themselves are different.
Any further suggestions?
anyone else?
anyone else?
still got the problem, can
still got the problem, can anyone tell me do I need to create symlinks for a dreamhost multisite setup?
Did you get this working?
I'd be interested in getting this to work too.
Nope still stuck... To
Nope still stuck...
To summarise my setup:
* Drupal is installed into the root of the first domain www.lightbeingcreations.co.uk
* I've changed the web directory for my second domain www.lightbeingcreations.org to point to host/username/lightbeingcreations.co.uk within my DreamHost control panel
* Sub-folder for second domain created within the sites folder, into which I have copied & edited the setting.php file to indicate the seperate database for this domain
When viewing www.lightbeingcreations.org I get a page full of errors that seem to be that the tables haven't been created for the database for this site. So I don't know how to create those as I thought they were created automatically by drupal.
If I set the web directory to host/username/lightbeingcreations/sites/lightbeingcreations.org then I just get the contents of that folder listed
I'm wondering if I need to set up symlinks, but I'm sure that's not needed with Dreamhost.
Suggestions folks?
does this help?
I don't know if anyone figured this out... but this is what I just did on my local machine. I already had a Drupal install under default and I decided it was time to play with multisite using Drupal 5.1 since I will have to set this up in my production environment. So, for my new "stage" site, these are the steps I took:
1. I updated /etc/hosts to add my new host
2. I updated vhosts.conf to add my new host -> pointing to main Drupal install; restarted Apache
3. I created a new database and user (using mysql)
4. I created a new subdirectory under Drupal's sites directory and put in the files directory and settings.php file. I put in a new database url but no prefix. I uncommented and updated the base_url (did this when things were not working, didn't make a difference).
5. When I hit the new site I saw all the "Warnings" that the tables were not there. After not finding the solution online and not wanting to recreate the tables by hand or copy my other database schema over, I simply accessed the install.php under the new domain and voila! The new tables were created and a link to the site was there and I got the admin page just fine. I was asked to create my first user and then I was off.
Yes, I do need to select the Modules I wish to use thus creating the new tables necessary.
I don't know how Drupal knows when it has installed itself once but it seems like this "install" setting should be once per domain. Not once per Drupal. I expected it to know that this was a new site setup and that tables needed to be created automagically.
I am running local and have a lot of control over my environment. I suppose in a production environment you would not keep install or update php files hanging around. I'm running Drupal 5.1, mysql 4.1 on a Mac. These instructions are pretty generic and should run under any platform. The trick seemed to be running the "install.php" again with the settings.php pointing to a new database.
This seems really simple... I feel like I must be missing something....
Seems I was. I just read this:
http://drupal.org/node/120216
If you keep your settings.php db_url empty, Drupal does the config for you. That's the magic... However, all the instructions talk about editing the settings.php directly which throws everything off.
Should have posted a while
Should have posted a while ago. I got it working as detailed at http://drupal.org/node/113770#comment-194277
I have a similar problem.
I got my site in Dreamhost, too. I'm trying to set up a subdomain using the codebase of the mainsite and share some database tables following the instructions in the documentation page Multisite with drupal for dummies.
I've installed Drupal 5.1 in a domain, let's say example.com. Then I created a subdomain like subdomain.example.com and configured the settings.php files both for example.com and for subdomain.example.com in sites directory.
I have a suffix of "main_" for database tables of the mainsite and I also created tables for the subsite with the suffix of "sub_"
Finally I created a symlink for subsite pointing to the main site using SSH with the command:
ln -s /home/username/example.com/ /home/username/subdomain.example.com/My directoy structure is like this:
-maildir
-subdomain.example.com
-example.com
-logs
Now when I type subdomain.example.com in my browser, it shows a directory link of "example.com" instead of showing the subsite. Clicking to link takes me a to a domain "http://subdomain.example.com/example.com/ and I get lots of errors which go like:
Warning: Table 'drupal.access' doesn't exist query: SELECT CASE WHEN status=1 THEN 0 ELSE 1 END FROM access WHERE type = 'host' AND LOWER('87.218.43.248') LIKE LOWER(mask) ORDER BY status DESC LIMIT 0, 1 in /home/.maydee/username/example.com/includes/database.mysql.inc on line 172
Warning: Table 'drupal.users' doesn't exist query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = 'bdca790d3398aa08921637153eda3f13' in /home/.maydee/username/example.com/includes/database.mysql.inc on line 172
.........
Where is the problem?
Thanks.
I deleted the folder
I deleted the folder subdomain.example.com. This time it doesn't show the "example.com" link and goes to the site but the error messages are still there.
Quick Answer:
Quick Answer: (Use with caution, I got a 'Fatal error: Call to undefined function:.....' while creating tables from the initial database after the above mentioned errors got cleared.)
Export initial Drupal Database. (Or even better, re-install Drupal in a remote folder/location and export the newly created database to avoid errors.)
Import the exported database into the multi site database.
(Optional unless ya want all the data to be the same. The next step removes data from the database while keeping its original schema/structure)
Select all newly created tables and choose 'EMPTY' (I used phpmyadmin, I'm new to php and sql)
(I know drupal users are meant to know a bit of coding. But it would help if newbie drupal users were instructed to uncomment the $baseurl command in settings.php to enable multisite installations)