Welcome Guest, Not a member yet? Register   Sign In
error is coming while accessing the session class in hooks

I m working on codeigniter from last 1 year mostly on 2.x
I had following settings in 2.x:
    config['enabled_hook'] = TRUE;
  calling hook form
  $hook['pre_controller'] = array(
   'class' => 'Auth_hook',
   'function' => 'check',
   'filename' => 'Auth_hook.php',
   'filepath' => 'libraries',
   'params' => ''

class auth_hook extends CI_Controller{
       public function check() {
       global $data;
       $data['title'] = "";
       $data['Session_Data'] = $this->session->all_userdata();
       $data['cnf'] = array($this->router->fetch_class(), $this->router->fetch_method());
....... sooon  see attachment code_snap.png

I had approx 8 project, successfully using this method.
but in CI 3.0.2 with same method
It is giving error unable to load Session.php SCRIPT.PHP
but  $this->session->all_userdata();
this line is working.
means extracting all session data. see attachment error_page_1.png
Huh means session is working here ..

Please let me know where i m doing mistake?

Theme © iAndrew 2016 - Forum software by © MyBB