![]() |
error is coming while accessing the session class in hooks - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: error is coming while accessing the session class in hooks (/showthread.php?tid=63906) |
error is coming while accessing the session class in hooks - kumaranup594 - 12-21-2015 I m working on codeigniter from last 1 year mostly on 2.x I had following settings in 2.x: config.php config['enabled_hook'] = TRUE; calling hook form $hook['pre_controller'] = array( 'class' => 'Auth_hook', 'function' => 'check', 'filename' => 'Auth_hook.php', 'filepath' => 'libraries', 'params' => '' ); Auth_hook.php class auth_hook extends CI_Controller{ public function check() { global $data; $data['title'] = ""; date_default_timezone_set('Asia/Kolkata'); $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 ![]() Please let me know where i m doing mistake? |