Hey guys, I'm having a weird issue (maybe not weird to people who know what's up though). My users get logged out in the middle of working, and i guess it has to be the session/cookie timeout. I've based my site on rob allen's tutorial (although i'm still using ZF 1.0.1). When I get the auth db adapter, my code looks like:
$authSession = new Zend_Session_Namespace('Zend_Auth'); $authSession->setExpirationSeconds( 1000000 ); // trying to make this "forever" // my db connection to authentication db $dbAdapter = Core_Db_Mysqli::getInstance('r', $this->_config->db_read->toArray()); // zend_adapter_db_table with a slightly different auth query $authAdapter = new Core_Auth_Adapter($dbAdapter); $authAdapter->setIdentity($username); $authAdapter->setCredential($this->encryptPassword($passwd)); $data = $authAdapter->getResultRowObject(null, 'password'); $auth = Zend_Auth::getInstance(); $auth->getStorage()->write($data); I think i might have a disconnect between trying to set expiration seconds, and writing the data to the session. Logging in works correctly, and the user stays logged in between page loads, but after a while, users get auto-logged out. I haven't noticed a consistent time between login and logout. The session portion of php.ini looks like: [Session] session.save_handler = files session.save_path = /tmp session.use_cookies = 1 session.name = PHPSESSID session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_path = / session.cookie_domain = .mydomain.com session.serialize_handler = php session.gc_probability = 1 session.gc_divisor = 100 session.gc_maxlifetime = 5400 session.bug_compat_42 = 1 session.bug_compat_warn = 1 session.referer_check = session.entropy_length = 0 session.entropy_file = session.cache_limiter = nocache session.cache_expire = 180 session.use_trans_sid = 0 Are any of those values auto-logging me out? Is there anywhere to look to see which of those affect session timeout? lifetime looks promising, but that should be "forever". Garbage collection maybe? Any help would be greatly appreciated. kabel