Why would session_set_save_handler not work?
Posted: Tue Dec 19, 2006 6:38 pm
Can anybody think of a reason why session_set_save_handler might not work? I am using Zend_Session which is still in the framework's incubator, but as far as I know, it's as simple as this:
Although the component is in the incubator, I find no reason why this shouldn't work. I've implemented Zend_Session_SaveHandler_Interface, and I've tested that each of my methods within that class work as they are supposed to. Am I missing something?
Code: Select all
static public function setSaveHandler(Zend_Session_SaveHandler_Interface $interface)
{
session_set_save_handler(
array(&$interface, 'open'),
array(&$interface, 'close'),
array(&$interface, 'read'),
array(&$interface, 'write'),
array(&$interface, 'destroy'),
array(&$interface, 'gc')
);
}Code: Select all
Zend_Session_Core::setSaveHandler(
new MC2_Session_Mysql($db)
);