Okay, I want http://example.com/mysite, so I put a config.php with the appropriate settings in the drupal/sites/mysite folder. I made a symlink and can confirm that example.com/mysite resolves to example.com/drupal, but it still just shows my default setup.

I've made sure my permissions are correct, double-checked the config.php files and all that stuff, still no-worky. The symlink is working, but Drupal won't connect to the other DB or anything. What could I be missing?

Comments

After having the same problem on my local testing server I discovered this worked for subsites:

set up the sites folder and have the subsite folder named localhost.mysite

the symlink then will find the correct path and database you specified.

However, as my needs called for setting up a test server I was trying to import a database and create a subsite. This didn't work with a phpmyadmin generated database backup.

I haven't been running straight 4.6 sites, as they have been patched with support for 'free tags'. The new CVS has this already so i've tried to set up a test site with this, as i'm already using it live. So if you're creating a multisite setup and upgrading you might find this account useful:

I turned off clean URLS and set the theme to bluemarine, then did a phpmyadmin backup. After importing the fields into the localhost database it still gave me errors that I could not get around to login. For example, no blocks were visible, there were a few printed errors, and no theme displayed, as well as no title or other navigation.

I had to add the fields myself through phpmyadmin. So I looked at the errors and searched for the relevant terms in the database/database.mysql file and did this:

ALTER TABLE tablenamefromerrorhere ADD COLUMN columnfromerrorhere columnparametersfromdatabase.mysqlhere ;

In the mysql file there are commas separating the lines. Since there is only one line being added make sure to replace the comma with a semi-colon.

After doing all of this it still looked like the theme wasn't recognized, but the errors were gone. Still no blocks either. I went to /sitename/?q=user and logged in with the proper account. There was another error here that I had to quell like the previous ones. After I hit the submit button it still appeared to not display the theme. I went to /sitename/?q=admin/themes and hit submit (the bluemarine theme was already selected) and it displayed as it should have. I can't explain it, but it worked.

Also - the update.php script didn't detect the proper last installation. It wanted 'all' but it was already at least a 4.6 site. I wasn't sure which to pick, so I stuck with 4.6 and up. It generated a few errors and sucessfully added some tables. I probably screwed this part up. I would recommend keeping track of what versions you download if you do such things. I know I will be from now on.

But everything seems to more or less be working, and since I was doing this to generate a test site it's all good.

I don't understand this instruction. When I name a file something like

loclhost.mysite

or anything.anything, the system recognizes that as a file, not a folder.

Perspectoff
Ubuntuguide.org/wiki/Kubuntuguide

This problem can sometimes be due to permissions on the symlinked directories.

I had the same issue, finally I realized that the problem was that php was running in safe mode.

In safe mode, the file_exists PHP function, always returns with FALSE. When drupal was searching the site's directory, did not find it, so it turned out using the default site all the time.

Changing the php config was the solution in my case.

What : multisite attempt with drupal in a subdirectory ( as in www.mysite.net/drupal )

Using symlinks and various other methods (domain parking, etc.) did not work on my hosted site.

With Cpanel (or a similar systems that allows you to specify the root of a subdomain),
and as hinted in a drupal.org Getting started guide article here,
you can set your subdomain (ex: dev.mysite.net ) to be directly linked to your drupal subdirectory.

Hence, for example, I created dev.mysite.net to have as root mysite.net/drupal

This is the functional way I found of bypassing the fact that symlinks simply never worked on my host.

EDIT - Warning: some odd hosting systems could crush your /drupal directory by replacing it with a new subdomain you link to /drupal. That would destroy your online installation of Drupal: not what you want. Cpanel should not do this, but please test it on an insignificant directory before (ex.: before I created my desired dev.mysite.net subdomain (a dev site), I did a test: I created a directory /test with some random content, then I added a dev.mysite.net subdomain with /test as a root. The /test directory remained intact).

__

Mind you, this is only the first challenge when you are creating a multisite with drupal in a subdirectory (!). I have not solved all the configuration issues yet, but now dev.mysite.net does resolves properly and at least shows the front page of my dev version (i.e. linked to a different database used, as you can guess, to develop/test new stuff without breaking my basic drupal site).

Michael Lessard
webmaster of Quebec City 'democracy in action' Media (Drupal6)