nadeemshafi9 Posted July 9, 2009 Share Posted July 9, 2009 hi guys im using zend_auth in zend framework, i log in and after like 20 mins or 15 of inactivity my session dies out and my app has a fit. is there nay ways of making the session that zend_auth itself uses longer or even handle its runnign out ???. zend_auth is a singleton and is instantiated and then got only once in teh bootstrap and is available everywhere just by getting its instance thanks guys $auth = Zend_Auth::getInstance(); // this is a standard session $myNamespace = new Zend_Session_Namespace('myNamespace'); // zend auth uses its own session $auth->getStorage()->write($user_row); // i can take it from zend auths session and put it into a standard session $myNamespace->user_group = Zend_Auth::getInstance()->getIdentity()->group; Quote Link to comment https://forums.phpfreaks.com/topic/165372-zend_auth-session-time-runnign-out/ Share on other sites More sharing options...
ignace Posted July 9, 2009 Share Posted July 9, 2009 You need to modify Zend_Session: Zend_Session::rememberMe(86400); // must be called before session start $auth = Zend_Auth::getInstance(); // call's session_start if not yet started Quote Link to comment https://forums.phpfreaks.com/topic/165372-zend_auth-session-time-runnign-out/#findComment-872159 Share on other sites More sharing options...
nadeemshafi9 Posted July 9, 2009 Author Share Posted July 9, 2009 i put it just before session start in bootstrap and my app died with no error ??? Quote Link to comment https://forums.phpfreaks.com/topic/165372-zend_auth-session-time-runnign-out/#findComment-872175 Share on other sites More sharing options...
ignace Posted July 9, 2009 Share Posted July 9, 2009 i put it just before session start in bootstrap and my app died with no error ??? Make sure your session hasn't already started: if (!Zend_Session::isStarted()) { Zend_Session::rememberMe(86400); } Quote Link to comment https://forums.phpfreaks.com/topic/165372-zend_auth-session-time-runnign-out/#findComment-872186 Share on other sites More sharing options...
ignace Posted July 9, 2009 Share Posted July 9, 2009 For more information: http://framework.zend.com/manual/en/zend.session.global_session_management.html#zend.session.global_session_management.rememberme Quote Link to comment https://forums.phpfreaks.com/topic/165372-zend_auth-session-time-runnign-out/#findComment-872189 Share on other sites More sharing options...
nadeemshafi9 Posted July 9, 2009 Author Share Posted July 9, 2009 For more information: http://framework.zend.com/manual/en/zend.session.global_session_management.html#zend.session.global_session_management.rememberme thanks v much Quote Link to comment https://forums.phpfreaks.com/topic/165372-zend_auth-session-time-runnign-out/#findComment-872202 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.