My host requires me to use a different domain for secure SSL access (shared SSL), so I need to switch to a user session between the two domains. One part of the page lives at http://example.com , and the SSL'd part is https://example.hosting.com . Essentially, I cannot set a cookie that supports the domain.
What I'm trying to do is translate the session id and re-set the cookie as follows:
http://example.com/normal/page , the user clicks the link to the protected area and goes to:http://example.com/secure/page , which calls the redirect:https://example.hosting.com/secure/page?sess=ikub... which resets the session and sets a new cookie valid for the domain, then redirects to:https://example.hosting.com/secure/page
This works until the moment when the session should be resurrected. I do:
function beforeFilter() { ... $this->Session->id($_GET['sess']); $this->Session->activate(); ... }
As far as I can tell, this should start with a given identifier. It actually generates a new session identifier, although this session is empty, data is not restored.
This is on CakePHP 1.2.4. Do I need to do something, or is there a better way to do what I'm trying to do?
source share