When I start browser and point to http://sklep.wietnam.info/ adres is rewrited to:

http://www.wietnam.infohttp//wietnam.info/singlesignon/initial_check?slave_session=d7578c62a627b9647c58f71d2c94a494 ->continue
&singlesignon_dest=http%3A%2F%2Fsklep.wietnam.info%2F,

It doesn't working.

When i type second time http://sklep.wietnam.info/ into address bar everything later is ok.

Drupal 5.1
singlesignon.module,v 1.21.2.2 2007/01/22 13:25:45
master site: wietnam.info
slave site: sklep.wietnam.info

I'm using it with one site and one database without any table prefixes. Can it cause a problem?
I'm also using multidomain.module,v 1.1.2.4 2007/03/07 23:20:58.

Comments

enboig’s picture

I have the same issue without multidomain. I use a shared database:

master:

$db_prefix = 'meg_';

slave:

    $db_prefix = array(
      'default'   => 'elrebost_',
      'users'     => 'meg_',  // usuaris
      'sequences' => 'meg_',  // perquè hi hagi IDs únics
      'sessions'  => 'meg_',  // per compartir les validacions
      'authmap'   => 'meg_',
      'profile_fields' => 'meg_',
      'profile_values' => 'meg_',
      'alt_login' => 'meg_' );

the main site is at http://servidor/meg and the slave is at http://servidor/elrebost (they are in a local server). The slave site have configured "http://servidor/elrebost" as a master; master server has nothing.

one of the mistakes I see is that when trying to access the slave site from the master site it goes to this url:
http://servidor/meg/elrebost/?q=singlesignon/initial_check
&slave_session=e1e864c1a7ab473410b74ee549dcddf5
&singlesignon_dest=http%3A%2F%2Fservidor%2Felrebost%2F

which I think is wrong because it should be: http://servidor/meg/?q=singlesignon/initial_check......

any clue of where the error is or how to solve it?

thanks

enboig’s picture

I have discovered the problem is just the url where the browser is redirected. If I:
1) login in the master site => i recive an error
2) write the base url of the master site => I am authenticated
3) go to the slave site => I am authenticated

So I think the problem is when the module redirects you after login in. I have activated clean URL, could this be a problem? I read there was a problem with it but it was long ago and appeared as fixed.

thanks.

enboig’s picture

removed clean url and problem solvet. I am pretty sure it is a bug in clean url; maybe they are not generated correctly?

karlrees’s picture

I get this exact same problem and I don't have clean urls enabled. I've also disabled all other modules. I'm using Drupal 5.1.

enboig’s picture

I just modified .htaccess to always loads with "www." and seems to work. My problem now (don't know if this is because singlesigon) is I can just login from the master site; when I try to log from my slave site the page loads (with all the theme, images, etc...) but just apear a "3" as content. any hint of what does this "3" means? I don't know how to track this problem.

enboig’s picture

I was having problems using a banners module and I discovered it was because of single sign-on; the first time I access the web, banners don't appear. The module use a javascript snippet to add the banners, which loads this url:
http://www.escoltesiguies.cat/modules/ad/adserve.php?q=4&t=112
The problem is the first access to the web, this url doesn't work, just the second time (you can try cleaning your cache.

This happen to the main site and I don't know why; any hint of how to solve this is wellcome

enboig’s picture

both my sites are on the same server, one as main domain and the other as subdomain. After disabling single sigon I also discovered that:
1) I login in the main site
2) I go to the subdomain site (i appear as not logged)
3) when I try to login, I am redirected to the front page without any error and not logged in.

I discovered that no problem appear if I remove my cache/cookies between logins; and after reading in forums I discovered it was a session problem which got solverd adding:


/**
 * We try to set the correct cookie domain. If you are experiencing problems
 * try commenting out the code below or specifying the cookie domain by hand.
 * or wanting to share cookies across installations in the same domain
 * try specifying the $domain and session name by hand.
  */
$domain = isset($_SERVER['HTTP_HOST']) ? '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']) : '';
// Per RFC 2109, cookie domains must contain at least one dot other than the
// first. For hosts such as 'localhost', we don't set a cookie domain.
if (count(explode('.', $domain)) > 2) {
  ini_set('session.cookie_domain', $domain);
 }
// use a unique session name. Session names only accept alphanumeric characters.
session_name(md5($domain.conf_path()));
 

in my settings.php The problem is I really don't know what exactly the problem is nor what does the solution. Could it be that now the single signon works? (sorry, I just can test it in my live site and I cannot afford trying things too much).

thanks

wayland76’s picture

Status: Active » Closed (duplicate)

The original problem appears to be a duplicate of http://drupal.org/node/132015

I recommend using the new version (which should appear within 24 hours).

I recommend to the people who wrote comments 4, 6, and 7 open separate issues for them.