English 中文(简体)
Zend Framework - session id re produced, can ttay lostal in [duplicate]
原标题:Zend Framework - session id regenerated, can t stay logged in [duplicate]

然而,由于某种原因,我试图将会议储存在一个使用泽斯德会议的数据库中,我的会议已经消失。 不能确定是否执行过某些法典,或者是否执行。

我已注意到,会议设计书似乎在经过一段缩略语之后重新印发。

即便在我查阅档案中增加了以下一线:

php_value session.auto_start 0

最终结果是,我每分钟就坐下来一分钟。

这里,我的密码载于我的陷阱档案中。

$config = array(
     name            =>  session ,
     primary         =>  id ,
     modifiedColumn  =>  modified ,
     dataColumn      =>  data ,
     lifetimeColumn  =>  lifetime 
);


$saveHandler = new Zend_Session_SaveHandler_DbTable($config);
Zend_Session::rememberMe($seconds = (60 * 60 * 24 * 30)); 

$saveHandler->setLifetime($seconds)->setOverrideLifetime(true); 

Zend_Session::setSaveHandler($saveHandler);
//start your session!
Zend_Session::start();

除Zentd_Auth在伐木时可能外,我不使用任何其他届会的相关职能。

Infact rememberme 简言之,“会议”职能——最终结果是,我每几分钟都不断gged。

问题回答

我认为,你可能会出现这一问题,因为你再次要求从本届会议开始纪念“我们的会议”。

您首先必须记住: 既然需要一个会议来安排记住会议的时间,那么我就没有做什么。

rememberMe calls the regenerateId function and the regeneration of the Id is what really needs the session to exist.

Place the rememberMe call after the session start then see how that works for you.

If that isn t it then I don t know what it could be since my code looks similar to yours.

Have you tried something like this?

protected function _initSession() {
    $config = array(
         name   =>  session ,
         primary   =>  id ,
         modifiedColumn  =>  modified ,
         dataColumn  =>  data ,
         lifetimeColumn  =>  lifetime ,
         lifetime  => 60*60*24*30,
    );

    Zend_Session::setSaveHandler(new F_Session_SaveHandler_DbTable($config));        
}

这样一来,在启动数据库会议之后,寿命就定下来,但直接列入初步编制方案——对我来说,我看不出为什么在你的情况下失败了。

I think you need to look once into following values after bootstrap code

session.gc_maxlifetime
session.cookie_lifetime

If You configure session resources in *.ini config file, check resources.session.cookie_domain parameter. I spend 3 hours when I remembered about it.





相关问题
why the session in iis automatically log out?

I used iis6, and when i called a function Directory.delete(), the all the session relate this website will be logged out. and i debugged the website, i found no exception. any one have ideas on this ? ...

Check session from a view in CodeIgniter

What is the best way to check session from a view in CodeIgniter, it shows no way in their user guide, otherwise I will have to make two views on everything, which is kinda weird...still a newbie to ...

Can I get the size of a Session object in bytes in c#?

Is it possible to get the size(in bytes) of a Session object after storing something such as a datatable inside it? I want to get the size of a particular Session object, such as Session["table1"], ...

提供严格分类的出席会议物体

提供严格分类的与会机会的最佳方式是什么? 我正计划转而选择矩阵,这正在促使汇编者抱怨我的幻觉方案拟订方法......

PHP Session is not destroying after user logout

I m trying to create an authentication mechanism for my PHP Application and I m having difficulty destroying the session. I ve tried unsetting the authentication token which was previously set within ...

热门标签