CodeIgniter Forums
Session doesn't work after update from 2.2.1 to 3 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19)
+--- Thread: Session doesn't work after update from 2.2.1 to 3 (/showthread.php?tid=67192)

Pages: 1 2


RE: Session doesn't work after update from 2.2.1 to 3 - muuucho - 01-26-2017

have you tried the files driver?
https://codeigniter.com/user_guide/libraries/sessions.html#files-driver


RE: Session doesn't work after update from 2.2.1 to 3 - raminderrandhawa - 01-26-2017

(01-26-2017, 08:28 AM)muuucho Wrote: have you tried the files driver?
https://codeigniter.com/user_guide/libraries/sessions.html#files-driver

Yeah actually I am using database driver .
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 86400;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 86400;
$config['sess_regenerate_destroy'] = FALSE;


RE: Session doesn't work after update from 2.2.1 to 3 - Wouter60 - 01-27-2017

Just wondering: did you rename all your php files that contain classes to names starting with a capital letter? That's one of the things CI 3.x requires.


RE: Session doesn't work after update from 2.2.1 to 3 - raminderrandhawa - 01-30-2017

(01-27-2017, 08:37 AM)Wouter60 Wrote: Just wondering: did you rename all your php files that contain classes to names starting with a capital letter? That's one of the things CI 3.x requires.

Yeah I did . Thanks


RE: Session doesn't work after update from 2.2.1 to 3 - raminderrandhawa - 01-30-2017

(01-26-2017, 08:32 AM)raminderrandhawa Wrote:
(01-26-2017, 08:28 AM)muuucho Wrote: have you tried the files driver?
https://codeigniter.com/user_guide/libraries/sessions.html#files-driver

Yeah actually I am using database driver .
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 86400;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 86400;
$config['sess_regenerate_destroy'] = FALSE;
I have tried files driver now. Now the error has gone but I am not able to login. This is how the structure of the config.php file 
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 86400;
$config['sess_save_path'] = APPPATH.'sessions/';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 86400;
$config['sess_regenerate_destroy'] = FALSE;
$config['sess_use_database'] = FALSE;

and 
$config['base_url'] = 'http://localhost';
 and databse.php has the following values 

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = 'pwd15';
$db['default']['database'] = 'srs';
$db['default']['dbdriver'] = 'mysqli';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;


RE: Session doesn't work after update from 2.2.1 to 3 - spjonez - 02-01-2017

The first error you listed explains what the problem is. You put Session.php in the libraries folder and that is not the correct location. It should be located here:

/system/libraries/Session/Session.php

Delete your system folder, download CI3 again and replace it with the one from the archive. Some systems are case sensitive make sure the bolded word has a capital S.