This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » Siteaccess, domain names and login

Siteaccess, domain names and login

Siteaccess, domain names and login

Monday 31 August 2009 11:36:06 am - 9 replies


I've got an issue for one of my project and maybe someone could help.

The website has several domain names but one siteaccess.

We have made a SSO handler to manage the automatic connexion.

Strangely, when are doing a redirection between two websites in a PHP custom module, we have a redirection loop only under IE. It seems to be linked to cookies. Under FF, there's no problem and redirection are well done.

As far as I know, the eZSession is creating a cookie for each domain name while we are expecting just one. So we have three cookies for the three domain names. I guess that the SSO Handler is called only when we have an anonymous user.

Is there a special way to make SSO Handler declaring only one cookie ?

Any suggestion is welcome !

Monday 31 August 2009 12:17:03 pm

"I guess that the SSO Handler is called only when we have an anonymous user."

"As far as I know, the eZSession is creating a cookie for each domain name while we are expecting just one."
PHP is controlling this, so you can't do anything about it unless they are all subdomains of one base domain.
Try the redirect loop SSO stuff in ezvlogin extension, it loops over all the domains on login and logs the user in on all sites. So the user has a uniqe session on all domains as one would expect.

[1] (RedirectList)

Modified on Monday 31 August 2009 12:17:43 pm by André R

Monday 31 August 2009 3:44:55 pm

Thank you Andre, it does the trick.

However, we still have an issue on the session side. We set some data in the $_SESSION value before login in and after those data has disappeared.
Any idea ?

Monday 31 August 2009 5:18:46 pm

The data will not be shared as they have different sessions on all sites, you can however use ezpreference. If your talking about loosing session data on login on the same server, then your probably on 4.1.0? (known issue there)

Monday 31 August 2009 6:08:40 pm

Yes this is our version.
Does a patch exist ? Do you know where I can fix that ?
Is there a "better" solution than using the ezpreference ?

Tuesday 01 September 2009 9:44:30 am

Yes, just download updated version of ezsession.php (Only needed for 4.1.0!):

But, there are plenty of things fixed in 4.1.1 and 4.1.2 (and a 4.1.2 regression in 4.1.3), so you really should update. And remember, it's just a matter of updating the files, run the sql updates and clear some cache. It's not like 4.0.1 / 4.0.2 update unfortunately was.

ezpreferences are user centric instead of session centric, so better for your scenario maybe. But I don't know what your using it for, as I have a hard time understanding what you need to share between the sites that you choose to use session forhappy.gif Emoticon

Tuesday 01 September 2009 10:34:39 am

Actually, we are in eZ 4.1.3. suspicious.gif Emoticon
The point is that we are doing things in a website, we redirect to another website and then we comeback to continue the stuff we were doing : --> -->

At step 1, we got some data in a session varaible ($_SESSION['mydata']), but at step3, those data has disappered. Our investigation leads us to the conclusion that eZPublish makes a kinf of reset for the session.

Tuesday 01 September 2009 10:44:57 am


It looks like you are trying to implement a web service, Have you looked at ezpublish REST extension, to implement this ?

Tuesday 01 September 2009 11:37:04 am

Not exactly.
We want to redirect to another website that is centralizing susbscriptions.
But when we come back from this website, the session is "cleaned".

Wednesday 02 September 2009 11:15:00 am

I finally found a wild redirection...
Thanx for your participation.


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

36 542 Users on board!

Forums menu

Proudly Developed with from