Using the link below for reference, I am trying to setup single sign on. I followed the instructions and for some reason I cannot get it to work.
http://www.lullabot.com/articles/drupal-single-sign-across-sub-domains

Two separate drupal installations with two separate databases. We are running a Windowz domain, with a domain name of mistequaygroup.com

Using Apache's VHosts options ive setup two virtual hosts on the same machine running CentOS 5. The two sites are http://mgldev.mistequaygroup.com and http://pay.mistequaygroup.com
The master sites database is named drupal, the slave paystubs. Right now they are both using the root user account that has access to both databases, phpmyadmin confirms this.

Here is my settings file for the master site.

$db_url = 'mysqli://root:PASSWORD@localhost/drupal';
$db_prefix = '';

$cookie_domain = '.mistequaygroup.com';

Here is my settings for the slave site.

$db_url = 'mysqli://root:PASSWORD@localhost/paystubs';

$db_prefix = array(
     'default'   => 'paystubs.',
      'users'     => 'drupal.',
      'sessions'  => 'drupal.',
      'role'      => 'drupal.',
      'authmap'   => 'drupal.',
    );

 $cookie_domain = '.mistequay.com';

Im really lost, I read all the comments on the lullabot article posted above and it's still not working. I can login on the master site (mgldev.mistequaygroup.com) but I am not automatically logged onto pay.mistequaygroup.com, nor can I login at all. On the slave site (pay.mistequaygroup.com) when I type in the admin (uid 1) username and password nothing happens, the page reloads but I dont get any kind of error message and I am not logged in.

Comments

mitchmac’s picture

Is $cookie_domain the same for both sites?

Then we configure the site to use the same "shared" cookie domain as the master.

styro’s picture

$cookie_domain = '.mistequay.com';

The "slave" sites $cookie_domain is not the same parent domain.

jhus’s picture

OH MY GOD THANK YOU!

tjmoyer’s picture

We use memcache on our site to handle user sessions, so I had to include a conf array that references memcache.inc and memcache-session.inc, along with those bins:

$conf = array(
   'cache_inc' => '[relative or full path to memcache on master site]/htdocs/sites/all/modules/memcache/memcache.inc',
   'session_inc' => '[relative or full path to memcache on master site]/htdocs/sites/all/modules/memcache/memcache-session.inc',
  'memcache_servers' => array(
    '127.0.0.1:11224'  => 'session' ,
    '127.0.0.1:11225'  => 'users'   ,
  ),
  'memcache_bins' => array(
    'session'  => 'session' ,
    'users'  => 'users'     ,
  ),
);

Once this is included along with the other settings, single login across subdomains worked perfectly.

Richard_40-1’s picture

Does anyone know if this is possible with drupal 7 and open atrium (drupal 6)? I don't know much yet about PHP coding. The code in the settings.php seems a bit different. For example, i can't find any line containing '$db_url = ' etc..