Trying to load Session library in Codeigniter. It seems to be clearly right but actully don't work. Here's a part of config file:
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
As well, ncryption key variable has already set. Moreover, CI 3 documentation can't give me the way to solve this problem.
I've tried to:
- Set 'sess_save_path' variable to 'ci_sessions'
- Check folders permissions
- Check if table 'ci_sessions' exists
- Use Autoloader class
- Use class name with capital S
It's strange a little, but config says:
/*
| -------------------------------------------------------------------
| Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in the system/www folder
| or in your application/www folder.
|
| Prototype:
|
| $autoload['www'] = array('database', 'email', 'session');
|
| You can also supply an alternative library name to be assigned
| in the controller:
|
| $autoload['www'] = array('user_agent' => 'ua');
*/
And here's a code of autoloader:
// Load www
if (isset($autoload['www']) && count($autoload['www']) > 0)
{
// Load the database driver.
if (in_array('database', $autoload['www']))
{
$this->database();
$autoload['www'] = array_diff($autoload['www'], array('database'));
}
// Load all other www
foreach ($autoload['www'] as $item)
{
$this->library($item);
}
}
$config['sess_save_path'] = NULL;? , have you tried$config['sess_save_path'] = 'ci_sessions'? - CodeGodie$config['encryption_key'] = 'anything_here'; - CodeGodie\system\libraries\Session\Session.php- CodeGodie$autoload['www'] ...Where did you download this from? did you do it from codeigniter.com? - CodeGodie