Session doesn't hold its value in IE

Notice: This thread is very old.
Stene
Member | 6
+
0
-

I downloaded the latest version of Nette (stable version 2.0.1 for PHP 5.2) and used its sandbox for new app to get result what is causing the problem with sessions in IE (previous stable version was correct).

I am using only this code in testing environment for HomepagePresenter:

echo $this->getSession('test')->id = 25;

and the next (get) one for another presenter

echo $this->getSession('test')->id;

Everything is ok in browsers such as mozilla, opera and chrome, but there is a problem with internet explorer (i reproduced this on ie7, 8, 9). I tried to get last NSession class from DEV 2.1 version, but it is not fixed there yet.

IE doesn't hold session and each browser reload means to create new session file on server (with empty value for my variable). I tried to solve this by P3P header in basepresenter startup (and bootstrap) but it didn't help. I tried to remove session_regeneration part of script, but it didn't solve it too.

Last edited by Stene (2012-03-23 11:36)

duke
Member | 650
+
0
-

This has also been discussed on czech forum (here). One of the discussants suggests to clear cache and cookies in IE.

Stene
Member | 6
+
0
-

Yes of course, I read this thread but it didn't solve this problem.

I tried to clear cache, remove all cookies, tried on another version of IE on virtual machine (trough VirtualBox), clear Nette cache, try it in browser relation, and nothing of these didn't solve it.

Tested on the Xampp with PHP 5.2.8. Session is created, but every each browser reload didn't read from this session server file – it creates a new one with empty variable value:

Session file, which was created after mozilla reload:

__NF|a:4:{s:1:"C";i:48;s:4:"Time";i:1332508699;s:1:"B";s:10:"w8hug9fra6";s:4:"DATA";a:2:{s:4:"test";a:1:{s:2:"id";i:25;}s:23:"Nette.Http.UserStorage/";a:2:{s:13:"authenticated";N;s:8:"identity";N;}}}

And another one after IE reload:

__NF|a:4:{s:1:"C";i:0;s:4:"Time";i:1332508785;s:1:"B";s:10:"w6jvrvtife";s:4:"DATA";a:2:{s:4:"test";a:1:{s:2:"id";N;}s:23:"Nette.Http.UserStorage/";a:2:{s:13:"authenticated";N;s:8:"identity";N;}}}

I read all similiar threads on Czech forum – it is a reason, why I post it to the “Bug reports” category.

Last edited by Stene (2012-03-23 14:24)

David Grudl
Nette Core | 8129
+
0
-

Could you try the latest dev release?