Welcome Guest, Not a member yet? Register   Sign In
Session data not kept in IE
#1

[eluser]Mr. Pickle[/eluser]
The session data I set at one page, is lost at the very next page I visit (or redirect to) under IE. Every other browser keeps the session data.

I've read a lot about that (due to the different cookie approach in IE) the server time can cause these problems if out of sync, but the server time seems okay and is similar to the time on the client.

I can't seem to grasp why session data is not working in IE.
I normally use CI's session approach setting the data as following:
Code:
$data = array('key' => 'value', 'key2' => 'value2');
$this->session->set_userdata($data);
And reading the data as following:
Code:
$value = $this->session->userdata('key');

Also setting a value as following:
Code:
session_start();
$_SESSION['key'] = 'value';
And reading it as following:
Code:
$value = $_SESSION['key'];
does not work.

I hope someone can help me with this!
#2

[eluser]kaos78414[/eluser]
If the second method does not work with IE then IE is set to block cookies. Both methods should work just fine. I don't use IE often, but look for a preferences setting (probably under security) to enable cookies.
#3

[eluser]InsiteFX[/eluser]
How to Access Cookies Settings
To view or modify cookies settings, follow these steps:
In Internet Explorer, click Internet Options on the Tools menu, and then click the Security tab.

Click the Web content zone you want, and then click Custom Level.
Under Cookies, click the options you want, click OK, and then click OK.

How to Customize Cookies Settings for Each Security Zone
You can set custom cookies settings for each security zone. To do so, follow these steps:
In Internet Explorer, click Internet Options on the Tools menu, and then click the Security tab.

Click the Web content zone you want, and then click Custom Level.
Under Cookies, click the options you want, click OK, and then repeat steps 1 through 2 for each zone.

How to Customize Settings for the Use of Session or Persistent Cookies
Session cookies are deleted when you quit Internet Explorer. Persistent cookies remain on your computer.

How to Customize Settings to Use Persistent Cookies
In Internet Explorer, click Internet Options on the Tools menu, and then click the Security tab.

Click the Web content zone you want, and then click Custom Level.
Under Cookies, click the option you want to use under Allow cookies that are stored on your computer, click OK, and then click OK.

How to Customize Settings to Use Session Cookies
In Internet Explorer, click Internet Options on the Tools menu, and then click the Security tab.

Click the Web content zone you want, and then click Custom Level.
Under Cookies, click the option you want under Allow Per-session Cookies (Not Stored), click OK, and then click OK.

InsiteFX
#4

[eluser]theshiftexchange[/eluser]
Just incase people searching threads come across this:

IE sessions might also fail if "cookie_domain" is not correctly set - especially if it is left blank. All other browsers will continue to work, but not IE.




Theme © iAndrew 2016 - Forum software by © MyBB