title: Save session in database using codeigniter
body: <p>I have an application made ​​by CodeIgniter.</p>
  
  <p>I have made so that it can be installed. When you come to the site I check if database.php available. If it does not exist so I create database.php and my database and tables.</p>
  
  <p>It works fine, but now I have a problem.</p>
  
  <p>I want to save the sessions in the database. (http://codeigniter.com/user_guide/libraries/sessions.html)</p>
  
  <p>To do that I had to change my config.php.</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'] = TRUE;
  $ config ['sess_table_name'] = 'Session';
  $ config ['sess_match_ip'] = FALSE;
  $ config ['sess_match_useragent'] = TRUE;
  $ config ['sess_time_to_update'] = 300;
  </code></pre>
  
  <p>The problem I have is that since I do not have a database.php from the start, I get an error message when I want to install the application. Error message I get is that database.php missing.</p>
  
  <p>How can I solve this? I have tried using this: $ this-> config-> set_item ('sess_use_database', TRUE);</p>
  
  <p>It has not worked. So any advice is welcome.</p>