Yesterday I had a similar problem and found a solution. Hope this helps another.
Problem: Suppose there is a site www.somewebsite.com and an IFRAME inside it that downloads a php file from my server, www.myserver.com/welcome.php . The website was loading successfully, as well as my welcome page, and it showed something like "Hello Bob", so it successfully found the user and started it.
Subsequently, my JavaScript made AJAX calls to another PHP file, and the response was in an “unauthorized” state, so the SESSION data was completely absent. After refreshing the page, everything worked correctly. And this only happened in IE8!
I thought the problem was with sending session cookies to the server, but when I installed Fiddler , I found that IE8 correctly sends cookies as well as PHPSESSID, but the server could not detect the correct SESSION object. Another strange thing: the server of the 2nd server sent the following header:
P3P: CP = "IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
but the first time not. After adding this header manually in a PHP script, everything worked like a charm!
Then, when I googled that "p3p abracadabra", I found the following website:
http://adamyoung.net/IE-Blocking-iFrame-Cookies
Conclusion: Make sure you send a headline on every page that sets a cookie.
And this is not only related to the IE8 + PHP combination, the same problem occurs in the case of IE8 + ASP.NET , IE8 + JSP , etc.
Germanz
source share