This is my table:
CREATE TABLE `Sessions` (
`id` varchar(32) NOT NULL,
`modified` int(11) default NULL,
`lifetime` int(11) default NULL,
`data` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB
This is in my bootstrap:
$sessionConfig = array(
'name' => 'Sessions', //table name as per Zend_Db_Table
'primary' => 'id', //the sessionID given by php
'modifiedColumn' => 'modified', //time the session should expire
'dataColumn' => 'data', //serialized data
'lifetimeColumn' => 'lifetime' //end of life for a specific record
);
$saveHandler = new Zend_Session_SaveHandler_DbTable($sessionConfig);
//cookie persist for 30 days
Zend_Session::rememberMe($seconds = (60 * 60 * 24 * 30));
//make the session persist for 30 days
$saveHandler->setLifetime($seconds)
->setOverrideLifetime(true);
//similarly,
//$saveHandler->setLifetime($seconds, true);
Zend_Session::setSaveHandler($saveHandler);
Zend_Session::start();
When I log in, nothing ever gets written to the Sessions table and I am logged out on the very next pageview.
Any ideas? I'm trying to have my users be perpetually logged in. Am I missing something in my login controller possibly?