Social Icons

Sunday, October 20, 2013

In order to use the Session class you are required to set an encryption key in your config file

This error code belongs to codeigniter (PHP MVC framework). Once I upgraded my codeigniter and while using session in codeigniter, I got the error as : "In order to use the session class you are required to set an encryption key in your config file". Here, I am providing the solution for this error. I fixed it as follows:

The reason they ask for an encryption key is security. Even if you are not using encrypted sessions, you must set an encryption key in your config file which is used to aid in preventing session data manipulation. So, you have to change in config.php as:

$config['encryption_key'] = 'your_encryption_key_here';

This should fix your error.

No comments:

Post a Comment

Total Pageviews