title: Manually start session with specific id / transitioning session cookie between domains
body: <p>My host requires me to use a different domain for SSL secured access (shared SSL), so I need to transition the user session between two domains. One part of the page lives at <code>http://example.com</code>, while the SSL'd part is at <code>https://example.hosting.com</code>. As such I can't set a domain-spanning cookie.</p>
  
  <p>What I'm trying to do is to transition the session id over and re-set the cookie like this:</p>
  
  <ul>
  <li><code>http://example.com/normal/page</code>, user clicks link to secure area and goes to:</li>
  <li><code>http://example.com/secure/page</code>, which causes a redirect to:</li>
  <li><code>https://example.hosting.com/secure/page?sess=ikub...</code>, which resurrects the session and sets a new cookie valid for the domain, then redirects to:</li>
  <li><code>https://example.hosting.com/secure/page</code></li>
  </ul>
  
  <p>This works up to the point where the session should be resurrected. I'm doing:</p>
  
  <pre><code>function beforeFilter() {
      ...
      $this-&gt;Session-&gt;id($_GET['sess']);
      $this-&gt;Session-&gt;activate();
      ...
  }
  </code></pre>
  
  <p>As far as I can tell this <em>should</em> start the session with the given ID. It actually generates a new session ID though and this session is empty, the data is not restored.</p>
  
  <p>This is on CakePHP 1.2.4. Do I need to do something else, or is there a better way to do what I'm trying to do?</p>