CodeIgniter Forums
help me about load session - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: help me about load session (/showthread.php?tid=62974)



help me about load session - seasenx6 - 09-13-2015

i load session but i have error load model why error?

i not load session -> load model is work.


RE: help me about load session - mwhitney - 09-14-2015

What is the error? Is the session being loaded anywhere else (for example, in a controller, or is it in the autoload config)?


RE: help me about load session - seasenx6 - 09-15-2015

my __construct() on subfolder controller

PHP Code:
public function __construct() {
    
parent::__construct();
    
$this->load->model('backend/Landingexpress_model''Landingexpress_model');


config session
PHP Code:
$autoload['libraries'] = array('database','upload''session');
///
$config['encryption_key'] = 'asdhkjhdfuwehrljkhwejrh';
///
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE

when i load model on __construct() my view is error 'Unable to locate the specified class: Session.php';

when i not load model session is working.

i dont where i wrong thank you.


RE: help me about load session - mwhitney - 09-15-2015

What does the model's constructor look like? Is it trying to load the session, or just trying to access it?


RE: help me about load session - seasenx6 - 09-15-2015

Oh thank "mwhitney" you say check model's constructor.

In model, i write "Extends CI_Controller".

ok i change "Extends CI_Model" -> session is work.

my big error and learning, oh very fun to me lol.