CodeIgniter Forums
Suddenly got error - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Suddenly got error (/showthread.php?tid=53422)

Suddenly got error - El Forum - 07-23-2012


When I was running my web app, I suddenly got an error. The controller is very simple:
class Home_controller extends CI_Controller{

public function __construct(){

public function index(){


and the view:
<!doctype html>







but instead, I got this error saying : "In order to use the Session class you are required to set an encryption key in your config file." I didn't even set any session at this stage. What's wrong? thanks

Suddenly got error - El Forum - 07-23-2012

Are you sure you aren't loading the session class anywhere? Autoload? Even if you're not using it...if it's loaded it needs an encryption key set in config.

Suddenly got error - El Forum - 07-23-2012

OMG, you're right. I'm so embarrassed of my cluelessness. thank you very much.