PHP安全会话抛出用户在快速页面请求


PHP secure session throwing out users in rapid page request

使用相当标准的PHP安全模型from here

每个页面都有如下的会话再生功能和login_check功能(见上面的url)。

function sec_session_start() {
$session_name = 'sec_session_id'; // Set a custom session name
$secure = false; // Set to true if using https.
$httponly = true; // This stops javascript being able to access the session id. 
ini_set('session.use_only_cookies', 1); // Forces sessions to only use cookies. 
$cookieParams = session_get_cookie_params(); // Gets current cookies params.
session_set_cookie_params($cookieParams["lifetime"], $cookieParams["path"], $cookieParams["domain"], $secure, $httponly); 
session_name($session_name); // Sets the session name to the one set above.
session_start(); // Start the php session
session_regenerate_id(); // regenerated the session, delete the old one.     
}

我的用户有一个问题,如果他们是在慢线和请求页面太快-他们被抛出,并带回到登录页面。我想可能是会话再生的问题。什么好主意吗?

我使用相同的,从来没有问题....

检查一下是否忘记启动

sec_session_start

的地方……

或者你可以有逆问题…你在某处多次调用了这个函数