CodeIgniter Forums
Suddenly got error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Suddenly got error (/thread-53422.html)



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

[eluser]global_erp_solution[/eluser]
Hi,

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

public function __construct(){
  
  parent::__construct();
  
}

public function index(){
  
  $this->load->view('welcome');
  
}

}

and the view:
Code:
<!doctype html>
&lt;html&gt;

&lt;head&gt;

  &lt;title&gt;&lt;/title>

&lt;/head&gt;

&lt;body&gt;

  Success

&lt;/body&gt;

&lt;/html&gt;
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

[eluser]CroNiX[/eluser]
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

[eluser]global_erp_solution[/eluser]
OMG, you're right. I'm so embarrassed of my cluelessness. thank you very much.