title: Setting custom session id causes script / apache to hang
body: <p>I'm in the process of building a single sign-on system and I am using <code>cURL</code> to send a request off to a file on the main site and return the results / their user data; however, if the user logs into the secondary site via a cookie (ie; they aren't currently logged into the main site) I need to make sure they get logged into the main site at the same time and set some session variables so that they don't continuously have to keep logging in via a cookie on the secondary site.</p>
  
  <p>Obviously we normally would end up with a different <code>session id</code> on the file I am calling via <code>cURL</code> and hence setting any <code>$_SESSION</code> variables there wouldn't be available to the secondary site; so I tried passing the <code>session_id</code> from the secondary site with the call via <code>cURL</code> and then in that file I did this to set the session id so that any <code>$_SESSION</code> variables I set there would then be available to the secondary site.</p>
  
  <pre><code>// Get session ID
  $sid = trim($_GET['session_id']);
  
  // Set the session id so we can get the added session data below via the forum
  session_id($sid);
  
  session_start();
  </code></pre>
  
  <p>However when I do that and try and access the secondary site the page won't load, it just hangs - I tried removing that code and loading it again but it won't load until I restart Apache.</p>
  
  <p>Btw.. if it matters, this is on my local dev machine, which is Windows XP Pro.</p>
  
  <p>Any ideas!?</p>