title: Why i am getting this Codeigniter session error
body: <p>I am a beginner in codeigniter. Learning codeigniter from <a href="https://www.youtube.com/playlist?list=PL8Ctjz_GsbE_aDCg2HqdM4X046XD5Jrjp" rel="nofollow">Here</a>. Now i need someones help to continue <a href="https://youtu.be/1f0qqFQjOAQ?list=PL8Ctjz_GsbE_aDCg2HqdM4X046XD5Jrjp" rel="nofollow">session</a>.</p>
  
  <p>//config.php</p>
  
  <pre><code>&lt;pre&gt; &lt;code&gt;    
      $config['sess_driver'] = 'database';    
      $config['sess_save_path'] = 'ci_sessions';    
      $config['sess_cookie_name'] = 'cisessions';    
      $config['sess_expiration'] = 7200;    
      $config['sess_match_ip'] = FALSE;    
      $config['sess_time_to_update'] = 300;    
      $config['sess_regenerate_destroy'] = FALSE;    
  &lt;/code&gt; &lt;/pre&gt;
  </code></pre>
  
  <p>//Database table </p>
  
  <pre> <code>
      CREATE TABLE IF NOT EXISTS `ci_sessions` (
          `session_id` varchar(80) NOT NULL,
          `ip_address` varchar(45) NOT NULL,
          `user_agent` varchar(120) NOT NULL,
          `last_activity` int(10) unsigned DEFAULT 0 NOT NULL,
          `user_data` text,
          KEY `last_activity` (`last_activity`)
      );
  </code> </pre>
  
  <p>mode_user</p>
  
  <pre><code>
  
      class Model_user extends MY_Model{
      protected $_table_name = 'user';
      protected $_order_by = 'name';
      public $rules = array(
          'email' => array('field' => 'email', 'label' => 'Email', 'rules' => 'trim|required|valid_email|xss_clean'),
          'password' => array('field' => 'password', 'label' => 'Password', 'rules' => 'trim|required'),
      );
  
      function __construct(){
          parent::__construct();
      }
  
      public function login(){
          $user = $this->get_by(array(
              'email'     => $this->input->post('email'),
              'password'  => $this->hash($this->input->post('password')),
          ), TRUE);
          if(count($user)){
              $data = array(
                  'name'      => $user->name,
                  'email'     => $user->email,
                  'id'        => $user->id,
                  'loggedin'  => TRUE,
              );
              $this->session->set_userdata($data);
          }
      }
  
      public function logout(){
          $this->session->sess_destroy();
      }
  
      public function loggedin(){
          return (bool) $this->session->userdata('loggedin');
      }
  
      public function hash($string){
          return hash('sha512'. $string . config_item('encryption_key'));
      }
      }
  
  </code> </pre>
  
  <p>user controller</p>
  
  <pre><code>
  
      class User extends Backend_Controller{
      function __consrtuct(){
          parent::__consrtuct();
      }
  
      public function login(){
          $rules = $this->model_user->rules;
          $this->form_validation->set_rules($rules);
          if($this->form_validation->run() == TRUE){
              //login & redirect
              $this->model_user->login();
          }
          $this->data['subview'] = 'admin/user/login';
          $this->load->view('admin/_layout_modal', $this->data);
      }
      }
  
  </code></pre>
  
  <p>Getting Error like this</p>
  
  <pre><code>A PHP Error was encountered
  Severity: Warning
  Message: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (ci_sessions)
  Filename: Unknown
  Line Number: 0
  Backtrace:
  </code></pre>
  
  <p>Please guide me to solve this error</p>
  
  <p>Thanks</p>