Zend Namespace - Check if Session Exists
Posted
by Vincent
on Stack Overflow
See other posts from Stack Overflow
or by Vincent
Published on 2010-04-06T16:29:32Z
Indexed on
2010/04/06
16:33 UTC
Read the original article
Hit count: 179
All,
I am using Zend Framework and Zend_Session to do global session management for my application. I plan to clear all sessions on logout and hence am using the following code:
if($this->sessionExists())
{
$this->destroy();
}
But it seems like it's not doing a good job.. I am getting an error:
PHP Warning: session_destroy() [<a href='function.session-destroy'>
function.session-destroy</a>]: Trying to destroy uninitialized session
How can I get rid of this error? Is there an alternative to sessionExists()?
© Stack Overflow or respective owner