ie8 session problem
session_start();
//If user was logged in then returns true,
//if user was NOT logged in then it returns false;
//except on ie8 this returns ALWAYS false, and never true
var_dump($this->user->is_logged_in());
$_POST['username'] = 'test';//username = test
$_POST['password'] = 'test';/开发者_C百科/pass = test
var_dump($this->user->login());//bool //true/
var_dump($this->user->is_logged_in());//bool true
die();
This is what I have on my script to debug my script and find out where the problem is... The problem is that on "ie8 only" The sessions do not seem to stay and always keep deleting on every request.
I should also mention b4 this code there is ob_start()
This is driving me mad :( help anyone? if more info needed I will add them.
Some things to check:
Are you sending a proper P3P
header on your responses?
IE seems to have a problem with cookies on Internet Zone sites if you're not sending P3P headers. You should send something like this with each response:
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"
See here also: http://msdn.microsoft.com/en-us/library/ms537343(v=VS.85).aspx
Does it work with another compatibility mode?
I've had cookie issues with IE8 unless its X-UA-Compatible
header is set to IE=EmulateIE7
, but your mileage may vary.
精彩评论