Zend_Session::expireSessionCookie method will fail when it is called on the same page as a new session is created.
Example:
a new user comes to my website, and I start a session using Zend_Session::start(), there will be no $_COOKIE[session_name()], so this test will fail,
if (isset($_COOKIE[session_name()])) {
...
}
which leaves a case when after I have called Zend_Session::expireSessionCookie, the user still has a session cookie!
I suggest to replace the if test w/ the following
if (isset($_COOKIE[session_name()]) || self::$_sessionStarted) {
...
}
}
which solved my issue