Page 1 of 1

"Drupal already installed" multisite issue...

Posted: Tue Dec 01, 2009 4:00 pm
by Wolf_22
I'm having problems getting my Drupal multisite to correctly work on the live server and I think it has something to do with the way sub-domains are being handled because it works flawlessly in my WAMP development environment on my laptop. When I uploaded everything, I went to install the initial core and this worked perfectly fine. When I went to install one of the multisites, however, I was surprised to see the following message:

"Drupal already installed

* To start over, you must empty your existing database.
* To install to a different database, edit the appropriate settings.php file in the sites folder.
* To upgrade an existing installation, proceed to the update script.
* View your existing site."

Here is my setup:

I'm using 1 database for a single login across the entire website.

Directories
public_html/drupal/
public_html/drupal/sites/site1/
public_html/drupal/sites/site2/
public_html/drupal/sites/site1/settings.php
public_html/drupal/sites/site2/settings.php

In CPANEL, I've set the following sub-domains to their respective roots:
Domain "http://site1.example.com/" has a root of "public_html/drupal/" with no redirection.
Domain "http://site2.example.com/" has a root of "public_html/drupal/" with no redirection.

I know the database is working because I have the core installed. The only problems I've had pertain to the live server environment. I did nothing with symlinks and have been wondering if this could possibly be the issue, but I have found nothing in terms of documentation on this that matches my situation. Maybe this could be caused by permissions?

This really has me pulling my hair out! Please, someone help me here!

Re: "Drupal already installed" multisite issue...

Posted: Tue Dec 01, 2009 6:13 pm
by John Cartwright
I've never used Droopal before so I cannot help you here, but I'm sure you would have better luck on the Droopal forums. (in case you haven't tried already).

Re: "Drupal already installed" multisite issue...

Posted: Tue Dec 01, 2009 6:25 pm
by Wolf_22
Thanks for the tip John. Yeah, I posted an almost identical post over there and currently find myself glued to my seat waiting for someone to reply. I just hope someone responds because I posted it yesterday... :( This issue really has me frustrated.

Re: "Drupal already installed" multisite issue...

Posted: Tue Dec 01, 2009 10:39 pm
by Wolf_22
Okay, so as it turns out, one of the big problems I experienced in this was the name of the multisite directories...

If you have a sub-domain name of "blah.example.com", then your directory name of the multisite directory MUST match that word-for-word. The name of the multisite directory would be "blah.example.com".

Another thing to remember is the potential of warning messages ruining the install process. If you experience this, simply place "error_reporting(0);" at the top of the install file and it will continue without hanging...

So now the only thing I'm having problems with is the single logon. The strange thing is that this was working flawlessly on my WAMP, but now, it's blowing up on the server. I have to login at each sub-directory...

My $db_prefix array within the default or base Drupal install (main domain) settings.php file has the following:

Code: Select all

   $db_prefix = array(
      'default'   => 'default_',
      'users'     => 'shared_',
      'sessions'  => 'shared_',
      'role'      => 'shared_',
      'authmap'   => 'shared_',
    );
And my other $db_prefix array within the site2 settings.php file has the following:

Code: Select all

   $db_prefix = array(
      'default'   => 'site2_',
      'users'     => 'shared_',
      'sessions'  => 'shared_',
      'role'      => 'shared_',
      'authmap'   => 'shared_',
    );
Is there a different table responsible for the shared login?

Re: "Drupal already installed" multisite issue...

Posted: Tue Dec 01, 2009 10:45 pm
by John Cartwright
Can you post the cookies (without any sensitive info it may include) created when the login occurs? I would suspect the cookies need to be set for the entire domain, and not the specific subdomain, i.e. "blah.foobar.com" vs ".foobar.com"

Re: "Drupal already installed" multisite issue...

Posted: Tue Dec 01, 2009 11:07 pm
by Wolf_22
It's setting individual cookies. There's one for "site2", "site3", etc. Each one's content is different, too. How could I go about setting the cookie for the entire domain?