Single login through different SiteAccess (using sub-domains)

Single login through different SiteAccess (using sub-domains)

Sunday 09 May 2010 8:14:40 am - 3 replies

Author Message

Hakim Bouras

Friday 14 May 2010 6:35:45 am

Hi,

Based on the doc written in site.ini (see below), I was expecting that it is possible to go through different site access with the same login by setting the SessionNameHandler to "default". But it does not work for me.

Any help to find out :

  1. if it is feasable
  2. what are the correct settings to use

will be greatly appreciated.

Thanks,
Hakim

Extract from site.ini (eZ PUblish 4.3)

# Decides how the name of the session value is handled.
# Possible values are:
# default - Let PHP decide the session name, this also rules
# out the possiblity for per-siteaccess sessions.
# custom - Use SessionNamePrefix for name. per-siteaccess sessions are possible.
SessionNameHandler=default

# Whether the session name should be unique per siteaccess.
# By enabling this you will be able to get one unique login per siteaccess.
# Session name is md5 encoded to avoid issues with non alphanumeric characters.
# Note: Will only work if SessionNameHandler is set to custom
SessionNamePerSiteAccess=enabled

Yannick Olympio

Thursday 09 September 2010 1:46:57 am

Hi Hakim,

Don't know if you've found something to make it work on your side ... Theses days I was working on a similar thing. Here is the workaround I've found :

Edit your site.ini like that :

[Session]
SessionNameHandler=custom
SessionNamePerSiteAccess=disabled

Set a common cookie_domain for all your sub domains! To do that you can edit your apache virtual_host and add that line into it :

php_value session.cookie_domain ".mysite.com"

Or you can redefine that php option directly in ez publish by editing the config.php file (in the root of your install) by adding that :

$hostSlices = explode('.', $_SERVER['SERVER_NAME']);
$hostSlices = array_slice($hostSlices, -2, 2);
$hostName = join('.', $hostSlices);
ini_set('session.cookie_domain', '.'.$hostName);

Hope it will be useful for several of us ;)

Gabriel Finkelstein

Wednesday 15 September 2010 10:05:30 am

Maybe this is what you need:

http://share.ez.no/articles/ez-publish/using-a-sso-in-ez-publish/

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.