Forum OpenACS Development: Re: Cookies and Port numbers with Mozilla and OpenACS

We've run into an IE cookie problem a number of times in the last year or so.

The problem comes about when you have two openacs instances running on the same time domain, with one at a different host.  For example: and  If you login to first and then try to login to you won't be able to.

When you go to, IE will look at its cookies and see one for and hand it to host. will look at the session_id and decide that it's an invalid session (since its a session) and send you to a login page.  After logging in, will try to set the ad_session_id cookie.  IE gets the cookie,  looks at the ad_session_id cookie and decides that host. doesn't have the right to change it, so it ignores the cookie.  Then asks for the updated cookie (redirecting after login) and IE passes it the wrong cookie again, putting the user in a loop.

The way we have overcome this on our sites is to prepend name of the host to the cookie the box serves up.  That way, the two servers don't set cookies with the same name.

My recommendation would be to have a kernel parameter that would allow admins to define arbitrary text that would be prepended to the cookie name (ie. host_ad_session_id).