未设置Codeigniter Tank_auth会话 [英] Codeigniter Tank_auth session not set

查看:69
本文介绍了未设置Codeigniter Tank_auth会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试了所有方法来在Codeigniter(3.0.6)和

以下是该会话的我的配置文件信息.

  $ config ['sess_driver'] ='数据库';$ config ['sess_cookie_name'] ='ci_session';$ config ['sess_expiration'] = 7200;$ config ['sess_save_path'] ='ci_session';$ config ['sess_match_ip'] =否;$ config ['sess_time_to_update'] = 300;$ config ['sess_regenerate_destroy'] =否;$ config ['sess_use_database'] = TRUE; 

Tank Auth配置:

  $ config ['login_by_username'] = TRUE;$ config ['login_by_email'] = TRUE;$ config ['login_record_ip'] = TRUE;$ config ['login_record_time'] = TRUE;$ config ['login_count_attempts'] =否;$ config ['login_max_attempts'] = 10;$ config ['login_attempt_expire'] = 60 * 60 * 24; 

我也试图在控制器中打印 $ _ SESSION ,但是成功登录后我看不到会话数据.

我早就使用了此组合(Codeigniter和TankAuth)(4年前).我没有得到这样的问题,这是一个快速的设置.但现在情况有所不同,无法正常工作.

 数组([__ci_last_regenerate] =>1597612277) 

解决方案

早期的3.x版本已经报告了多个会话问题,并且与PHP版本> = 7.1不兼容:

这些问题已在更高版本中得到解决,请仅对CI 3.1.11进行快速更新.

您可以在此答案中找到更多详细信息: https://stackoverflow.com/a/46876622/2275490

I have tried all the ways to set the session in the Codeigniter (3.0.6) and Tank Auth (a plug in for Login and Registration). Nothing is working for me.

Here is my ci_session table data.

Below is my Config file info for the session.

$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'ci_session';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
$config['sess_use_database'] = TRUE;

Tank Auth config :

$config['login_by_username'] = TRUE;
$config['login_by_email'] = TRUE;
$config['login_record_ip'] = TRUE;
$config['login_record_time'] = TRUE;
$config['login_count_attempts'] = FALSE;
$config['login_max_attempts'] = 10;
$config['login_attempt_expire'] = 60*60*24;

Also I have tried to print the $_SESSION in a controller, but I don't see the session data after the successful login.

I have used this combination (Codeigniter and TankAuth) long back (4 years before). I did not get such issues, it was a quick setup. But now it is something different and not working.

Array
(
    [__ci_last_regenerate] => 1597612277
)

解决方案

There have been several Session issues reported with early 3.x versions and for incompatibility of PHP version >= 7.1 :

Those issues were resolved with the later releases, please just perform a quick update to CI 3.1.11.

you find further in depth details in this answer: https://stackoverflow.com/a/46876622/2275490

这篇关于未设置Codeigniter Tank_auth会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆