My libraries in autoload.php
is:
$autoload['libraries'] =
array('database','pagination','session','cart','form_validation');
I get this error:
An Error Was Encountered Unable to load the requested class: session
I'm using codeigniter version 3.0.
Thanks to all,
finally i found a solution,
I loaded this library like this:
$this->load->library('Session/session');
I used it because in codeigniter 3.0 the libraries files of session is located in the path :
System/libraries/Session/Session.php.
Now, it is working...
Check encryption key in config/config.php
. If not set then set encryption key in config/config.php
You must set encryption key in config/config.php before you use session class. As official documentation described, please make sure about that when you choose encryption key,
To take maximum advantage of the encryption algorithm, your key should
be 32 characters in length (128 bits). The key should be as random a
string as you can concoct, with numbers and uppercase and lowercase
letters. Your key should not be a simple text string. In order to be
cryptographically secure it needs to be as random as possible.
Hope it will be useful for you.
If you are on Unix/Linux, make sure to load your library with capital letters:
$autoload['libraries'] = array('Session');
^
Also setting encryption key is important.
Set encryption key in config.php
$config['encryption_key'] = 'your_key';
Key can be anything
Hope your problem can be resolved
Thnaks
I downloaded the latest version of CodeIgniter and only replaced the Session folder from system/libraries with my old folder and it worked without changing any other things.
Downloaded codeignitor latest version
Copied the folder Session from system/libraries/
and have replaced the folder in my current project and voila it started working for me.