title: Does PHP set by default the session cookie for all subdomains?
body: <p>I wonder how this quote from the <a href="http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-domain" rel="nofollow">PHP manual</a> should be interpreted:</p>
  
  <blockquote>
    <p>session.cookie_domain specifies the domain to set in the session
    cookie. Default is none at all meaning the host name of the server
    which generated the cookie according to cookies specification.</p>
  </blockquote>
  
  <p>Does it mean that when calling <code>session_start</code> on URL www.somedomain.com/somepage.php the cookie will have the following form: </p>
  
  <pre><code>Set-Cookie  PHPSESSID=e48gh5mqggccgmn8172f0j5a06; path=/; domain=.somedomain.com
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>Set-Cookie  PHPSESSID=e48gh5mqggccgmn8172f0j5a06; path=/; domain=www.somedomain.com
  </code></pre>
  
  <p>I have seen on index pages the first cookie header and on other pages a header without a domain.</p>
  
  <p>Can someone bring some insight on this?</p>
  
  <p>Thanks</p>