Hi all. I have been trying 5 hours to create multisite on a single installation of drupal but still can't do it. so I finally decided to drop a message here..
I have installed drupal 4.6.0 into http://cms.mydomain.com. I have no problem with this so far, I can go to that URL and create the first admin user.
Now, I'm trying to create another site which is completely separated. The URL for this site will be http://cms.mydomain.com/customer.
According to the INSTALL.txt, all I have to do is create a folder called "cms.mydomain.com.customer" under "sites" folder and then copy settings.php from "default" folder to "cms.mydomain.com.customer".
In settings.php I have;
$db_url = 'mysql://username:password@localhost/database';
$db_prefix = '';
$base_url = 'http://cms.mydomain.com';
But this does not seem to work as I get "page not found" error when I try to access http://cms.mydomain.com/customer.
I have noticed that a few people here are talking about symbolic link, but I have no idea how to use shell command plus there seems to be others saying there is no need to create symlink.... Some people even saying rename settings.php to (in this particular case) cms.mydomain.com.customer.php.... I'm getting really confused.
and, I want to create sites which all work completely independently, so in settings.php I have actually tried something like;
$db_prefix = 'customer1_';
But it gives me error, can't find tables or something. It seems to me that I need to manually create tables with the prefix.... but I use cPanel on the server to import "database.mysql" which comes with drupal so it all automatically creates all the tables without the prefix. It puzzles me because nobody seems to be talking about this.
well.. I'm sorry for such a long post. But I desparately need a help. I would really appreciate if someone could help me step by step.
Comments
if you can't make symlinks,
if you can't make symlinks, then you have to either a) ask your host to make the necessary links or b) get a different host. Basically you have to be able to do so, or else it won't work. I spent many hours trying to do that as well, only to be disappointed. It would be very easy if you had command line access as a symlink is essentially a shortcut for *nix. A lot of third party hosts don't allow you access like that.
OK I will try to make
OK I will try to make symlinks with PHP then. Could you tell me exactly where I need to create symlinks in my case?
EDIT: WOW I did a seach on symlinks and I found the solution! and now I can finally access to http://cms.mydomain.com/customer !! Thank you all for the posts!!! I'm a happy man now :))
Where did you find your symlink solution?
Can you share where you found your solution? I've been having problems with this as well. Are you running one database or multiple?
Thanks,
Linda
Well.. All I found is how to
Well.. All I found is how to create symbolic links by PHP.
I just ran the following PHP code under cms.mydomain.com (/www/cms/).
You probably need to chmod 777 the parent folder (in my case "cms") otherwise you will get "Permission Denied".
I would like to run separate database for each site but I haven't tried yet since I just got up (my last post was 4am in the morning.. :P )
works great for me
multi-site works great for me (at least on IIS).
I put the drupal code in the root web directory. I created a database for site1 called default and imported the database.mysql and configured sites/default/settings.php to point to it.
I created a second database for site2 and called it sample and populated it with the database.mysql. I then added a directory and configuration to point to it. site/www.sample.com/settings.php
I added a host header in my web server for www.sample.com. It worked just fine. I still need to test out contrib modules per site but haven't had the time.
-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide