Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zend Framework - Internet Explorer - phpsessid cookie issue

I've created a Zend Framework Website App session intensive.

It works great in Chrome and Firefox but it is not working in IE. The session resets every page in IE.

Looking into the headers I find that IE browser is getting a different phpsessid cookie in every get or post within the same browser so the session is not working. In FF and Chrome the phpsessid cookie persists ok.

Anyone knows why this can happend only in IE?

I have this code in bootstrap.php:

$generalSession  = new Zend_Session_Namespace('MyNameHere');
$generalSession ->setExpirationSeconds(1000 * 60);

I recover the session using:

Zend_Auth::getInstance()->getStorage()->read();

My IE configuration for privacy and security is set to minimum, using IE9.

I've tryed placing a p3p cookie in the headers but it made no difference.

What am I missing?

like image 642
Hazon Avatar asked Nov 24 '25 12:11

Hazon


1 Answers

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!!

like image 148
Hazon Avatar answered Nov 28 '25 04:11

Hazon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!