php - Internet Explorer 8 doesn't pass session cookie for ajax request -


I have a simple PHP application, it works on all browsers except IE8 Beta 2, the problem occurs when I I try to update table fields using Ajax Call (jQuery Post method). Using IE8 Debugger I have to find out that IE8 does not send session cookies, so PHP scripts redirect to the login page instead of performing the requested action.

What can I do to do this work?

EDIT: I have not mentioned that I am using code ignater so I have solved this problem instead of Code Igniter default session implementation native implementation of a code igniter default session All data Uses cookies to store

yesterday I had a similar problem and found solutions I hope this will help anyone else

Problem: Suppose a website is www.somewebsite.com and inside it IFRAME loads the php file from my server, Www.myserver .com / welcome.php . The website was successfully loading as its welcome page and it showed something like "Hello Bob", so it successfully found and logged the user.

After this my JavaScript was calling AJAX on another PHP file, and the response was in the "not authorized" state, so the session data was completely missing after the page was refreshed, everything was correctly Was working with. And it's just happening under IE8!

I think the problem was with sending the session cookies to the server, but when I installed it, I came to know that IE8 was sending properly with PHPSESSID to cookies, but the server was kind Another strange thing that was unable to detect the correct session object was that the second time the server sent the following headers:

P3P: CP = "IDC DSP Core ADM Devi Tai PSA PSD IVI IVDi Her Our India Cnt "

But not the first time. After manually adding the header to the PHP script, everything works like a magic!

Then, when I made a mistake that "p3p abracadabra", I found the following web site:

Conclusion: Make sure That you are sending headers on each page that sets cookies.

And it is not related to only IE8 + PHP combination, IE8 + ASP.NET , IE8 + JSP , etc. The same problem happens in the case of


Comments