title: best way to store session in codeigniter
body: <p>I want use <strong>session</strong> in my website but I can't find best way to store them, <strong>codeigniter</strong> offers <em>files</em>, <em>database</em> and so on. but which is best??</p>
  
  <p>I use file with this config:</p>
  
  <pre><code>$config['sess_driver'] = 'files';
  $config['sess_cookie_name'] = 'ci_session';
  $config['sess_expiration'] = 0;
  $config['sess_save_path'] = '_s';
  $config['sess_match_ip'] = FALSE;
  $config['sess_time_to_update'] = 0;
  $config['sess_regenerate_destroy'] = FALSE;
  </code></pre>
  
  <p>but i get this error:</p>
  
  <pre><code>Unable to create file ./_s\ci_sessionecc1dccdd1118e02ee956dde8aadaf7f1116c1ac because No such file or directory
  </code></pre>
  
  <p>I must use <em>database</em> ??  </p>