title: PHP Sessions across domains and shared multiple domains
body: <p>I am trying to set up the following:</p>
  
  <pre><code>login.domain.com
  site1.domain.com
  site2.domain.com
  https://domain2.com
  </code></pre>
  
  <p>where if the user visits site1.domain.com or site2.domain.com and they are not logged in, they redirect to login.domain.com/?url=site1.domain.com</p>
  
  <p>On php aplication domain.com. Im set up php.ini session using redis.</p>
  
  <pre><code>session.save_handler=redis
  session.save_path="tcp://127.0.0.1:6379?weight=1&amp;database=14"
  </code></pre>
  
  <p>After authentication success. Im set cookie session_id.</p>
  
  <p>On site1.domain.com and site2.domain.com .Im get Cookie </p>
  
  <pre><code>$sessionid = $_COOKIE['session_id'];
  session_id($sessionid);
  session_start();
  </code></pre>
  
  <p>User login success.</p>
  
  <p>But I have problem. How to domain2.com get cookie, domain https SSL access it and security.</p>