Session doesn't work after update from 2.2.1 to 3 |
have you tried the files driver?
https://codeigniter.com/user_guide/libra...les-driver
(01-26-2017, 08:28 AM)muuucho Wrote: have you tried the 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;
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.
(01-26-2017, 08:32 AM)raminderrandhawa Wrote: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(01-26-2017, 08:28 AM)muuucho Wrote: have you tried the files driver? $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;
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. |
Welcome Guest, Not a member yet? Register Sign In |