title: Session ID is changing in CodeIgniter
body: <p>I am using the session feature of CodeIgniter, and I'm running this code:</p>
  
  <pre><code>$session_id = $this-&gt;session-&gt;userdata('session_id');
  echo "My Session ID is $session_id"; 
  </code></pre>
  
  <p>And it keeps changing every time I load the page. Does this mean that sessions are not being saved properly? Is there any way to debug this and find out why? Or am I not using this library correctly?</p>
  
  <p>I don't get any errors when I enable error reporting, and I'm using the autoload ability of CI to load the session library:</p>
  
  <pre><code>$autoload['libraries'] = array('session');
  </code></pre>
  
  <p>Any advice would help thanks!</p>
  
  <p>Example Output of the Code above:</p>
  
  <p>My Session ID is 7c92bac53d2654df6e87eb4e4cb25467</p>
  
  <p>.. reload ..</p>
  
  <p>My Session ID is c6dd14aed2499760f788a1364dcab030</p>
  
  <p>UPDATE: My session configurations inside config.php look like this:</p>
  
  <pre><code>$config['sess_cookie_name']     = 'ci_session';
  $config['sess_expiration']      = 7200;
  $config['sess_expire_on_close'] = FALSE;
  $config['sess_encrypt_cookie']  = FALSE;
  $config['sess_use_database']    = FALSE;
  $config['sess_table_name']      = 'ci_sessions';
  $config['sess_match_ip']        = FALSE;
  $config['sess_match_useragent'] = TRUE;
  $config['sess_time_to_update']  = 300;
  </code></pre>
  
  <p>So I have found that </p>
  
  <pre><code>session_start();
  $_SESSION['myvar']='var'; 
  </code></pre>
  
  <p>doesn't store anything either, something seems to be wrong with the session storage on my linux server.</p>
  
  <p>My session save path has apache:apache 775 permissions. Perhaps this should be moved to serverfault?</p>