title: php sessions not carrying over from one page to the next
body: <p>I've used sessions before on shared hosting and they were very simple. I'm now using Amazon and have linux server with the following configuration in php. The catch is session variables don't carry on from one page to the next:</p>
  
  <pre><code>session
  
  Session Support enabled
  Registered save handlers    files user memcached
  Registered serializer handlers  php php_binary
  
  Directive   Local Value Master Value
  session.auto_start  Off Off
  session.bug_compat_42   Off Off
  session.bug_compat_warn Off Off
  session.cache_expire    180 180
  session.cache_limiter   nocache nocache
  session.cookie_domain   no value    no value
  session.cookie_httponly On  On
  session.cookie_lifetime 0   0
  session.cookie_path /   /
  session.cookie_secure   Off Off
  session.entropy_file    no value    no value
  session.entropy_length  0   0
  session.gc_divisor  1000    1000
  session.gc_maxlifetime  604800  604800
  session.gc_probability  1   1
  session.hash_bits_per_character 5   5
  session.hash_function   0   0
  session.name    PHPSESSID   PHPSESSID
  session.referer_check   no value    no value
  session.save_handler    files   files
  session.save_path   /var/lib/php/session    /var/lib/php/session
  session.serialize_handler   php php
  session.use_cookies On  On
  session.use_only_cookies    On  On
  session.use_trans_sid   0   0
  </code></pre>
  
  <p>Sample Page: <a href="http://www.datingjapan.co/index.php" rel="nofollow">http://www.datingjapan.co/index.php</a></p>
  
  <p>Code:
   index.php</p>
  
  <pre><code>&lt;?php
  session_start();
  error_reporting(E_ALL &amp; ~E_NOTICE);
  $_SESSION['domain'] = 'www.datinggirls.co';
  print_r($_SESSION);
  ?&gt;
  
  &lt;h1&gt;This is the HTML&lt;/h1&gt;
  &lt;a href="page.php"&gt;Visit W3Schools&lt;/a&gt;
  </code></pre>
  
  <p>page.php</p>
  
  <pre><code>&lt;?php
  session_start();
  $_SESSION['page2'] = 'page-two-data';
  print_r($_SESSION);
  ?&gt;
  
  &lt;h1&gt;This is page 2&lt;/h2&gt;
  &lt;a href="index.php"&gt;Visit Home Page&lt;/a&gt;
  </code></pre>
  
  <p>Any advise... ?</p>
  
  <p>thx</p>