Zend Framework - Internet Explorer - phpsessid cookie issue

馋奶兔 提交于 2019-12-05 20:03:06

I've finally solved the problem with IE.

The thing was that our dev server was dev_landing.mysite.com and IE rejects headers from sites with "_" in their names... this is by design in IE.

I found the complete explanation here: http://odedpeer.blogspot.com.es/2009/08/why-are-my-http-cookies-rejected-by-ie.html

Keep doing!!

all you need to make sure the session starts in ZF1 is:

 //in bootstrap.php
 protected function _initsession()
    {
        Zend_Session::start();
    }

This will initialize the session just like in vanilla PHP.

Unless you are changing it elsewhere Zend_Auth uses the Zend_Session_Namespace('Zend_Auth'); so any namespace you create will not be accessible to Zend_Auth.

When you create an instance of Zend_Session_Namespace() the session will started if it hasn't already been started.

I have to wonder if everytime your boostrap.php runs (every request) that Zend_Session_Namespace() call if you don't get a new session id in explorer. Maybe try and just call start in the bootstrap and just instantiate the namespaces when needed. It's also possible that some code/information not present in your question is affecting the session.

A lot of guessing going on here, so good luck.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!