I'm working with codeigniter for not a long time, but I encountered a really weird issue.
I'm trying to set a session called user_id after login process but for some reason I get a MYSQL error, even doe I do NOT use MYSQL as session storage.
There's the session config file.
$config['sess_driver'] = 'files';
$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;
$config['sess_regenerate_destroy'] = FALSE;
There shouldn't be any reason for CI to actually give me a MYSQL error when trying to set the session.
答案 0 :(得分:1)
我设法找到答案......问题是默认情况下最新的Codeigniter版本没有在config.php文件中添加$config['sess_use_database'] = FALSE;
。