Now you can Subscribe using RSS

Submit your Email


(Solved) Unable to load the requested class: Session | Codeigniter

Vishal Shrestha
This is a small hindrance that can cause a huge headache. It usually happens when you are trying to load session more than once or there are some files missing in the system folder. In my case it was solved rather simply, I just copied the system folder from a working project and and replace the system folder in the non working project with this one. If this still doesn't fix your issue you can try and perform the following steps, I am sure one of these will work out in your favor.

Fixing Unable to load the requested class: Session

  • Make sure you load the session library in autload.php:  
  • $autoload['libraries'] = array('session'); 
  • Make sure your encryption key is set in cofing.php:
  • $config['encryption_key'] = 'any random sequence here' 
  • If you are on Unix/Linux, make sure to load your library with capital letters: $autoload['libraries'] = array('Session');

  • In you config file inside application/config/config.php set the session variable to these values- $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;
If none of the above steps fix your problem then replace your system folder with the system folder of a working project or download and do a fresh install of Codeigniter from

Vishal Shrestha / Author & Founder

A developer by profession, a born Adventurer. I mainly do Android but like to get my hands dirty with web development and a little bit of Python. I would't rather go on a Trek than a party and you can find me having a few rounds with the heavy bag to let out the steam ;)


Research and Development at : Ekghanti

Mobile Technology Lead at : Vimvox Lab

For Business info : My Portfolio Site


Post a Comment

Coprights @ 2017 | The Code City by Vishal Shrestha Vishal Shrestha