Dan Rossi wrote:
Sorry for the spamming, ive narrowed it down to a problem in
Zend_Session::start(); , if i call Zend_Session::setOptions then the
raw session_start() method after running a session_destroy on the non
cookie session its fine I get an id wherevers start() is still trying
to use the non cookie session and not use the cookie one. in start()
SID is still the non cookie session so it thinks its still this and
that the session is open even though the session is destroyed ?
if (self::$_sessionStarted) {
return; // already started
}
Thinks its still started so doesnt run start, getId never returns an id.
Again if I just run session_start() directly it comes up fine, i get
output from getId.
Alright, I get the session on the index controller if i do this in the
check controller, i suppose the session_destroy / session_start needs to
be tested.
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity())
{
if ($auth->getStorage()->read()->access_code)
{
$access_code = $auth->getStorage()->read()->access_code;
$auth->clearIdentity();
Zend_Session::destroy(true,false);
Zend_Session::setOptions($config->session->toArray());
session_start();
Zend_Session::regenerateId();
$this->session = new Zend_Session_Namespace('NameSpace');
$this->session->access_code = '23598532908325';
$this->_redirector->gotoUrl('/');
return;
}
}