title: how to transfer $_Session superglobal over sub domains
body: <p>I'm currently working on a system that allows a login over multiple subdomains. Unfortunately all methods i've tried of transferring the UID session (of which the account ID is stored) over does not work. The problem i would like to solve is transferring <code>$_SESSION['UID'];</code> from its login location at <code>account.domain.co.uk</code> to <code>domain.co.uk</code>. I do not however want this session to pass through to all subdomains, just the main domain and account.domain.com. I have a file named init.php which is called before anything else. At the moment the file looks like this:</p>
  
  <pre><code>&gt; // -- initialization file -- //
  &gt; 
  &gt; if ($_SERVER[HTTP_HOST] === 'account.domain.co.uk' || $_SERVER[HTTP_HOST] === 'domain.co.uk') {
  &gt; session_name('some_name');    
  &gt; session_set_cookie_params(0, '/', 'domain.co.uk'); 
  &gt; }
  &gt; 
  &gt; session_start();
  </code></pre>
  
  <p>The original session is set at account.domain.co.uk. I have also tried:</p>
  
  <pre><code>ini_set('session.cookie_domain', '.domain.co.uk');
  </code></pre>
  
  <p>but unfortunately that doesn't work either.</p>
  
  <p>All help to get this working will be greatly appriciated, and if any additional information is needed i will be happy to supply. Thanks!</p>
  
  <p>EDIT 1 - Bump for response?</p>