Welcome Guest, Not a member yet? Register   Sign In
IE8 session/cookie problem - SOLVED
#1

[eluser]GlennJ[/eluser]
I have been programming CI for a while now and have created a website which uses CI's session lib for the login system.

This works fine for the whole site, but I have now come to integrate PayPal IPN. The site redirects to PayPal, but when you click back from PayPal the session is lost.

Now this only happens in IE8. IE6/7, FF, Safari, Chrome, Opera all work without problem.

I have tried extending the session expiration to 72000, I checked the server's time and the local machine's time. I even removed the underscore from the cookie name, just in case!

Still IE8 continues to lose the session... can anyone help?
#2

[eluser]Maglok[/eluser]
Have you checked to see if it blocks cookies due to standard security/privacy settings?
#3

[eluser]GlennJ[/eluser]
I need to find a decent cookie browser for IE8 so I can see what is happening.

Strange thing is, it worked OK on my laptop at home (running IE8). But in the office we tested on 2 machines running IE8 and it failed as mentioned.

How would you check to see if it "blocks" cookies?
#4

[eluser]Maglok[/eluser]
In the bar at the bottom you will see a eye and a round red circle. IE8 blocks crossdomain cookies by default (from Paypal it's cross domain). It's very possible that you have your security settings lower @ home.

Also IE8 comes with a developer 'thing', press F12 to 'boot' it. Then you can view cookies by going to the cache menu.
#5

[eluser]GlennJ[/eluser]
Why would it be a crossdomain cookie though? It was set on my website and only called from that website. Just the user browses to PayPal in between...

Thanks for the F12 tip! I have been using that, but hadn't found the view cookies button.

Will continue my investigation after lunch Big Grin
#6

[eluser]Maglok[/eluser]
The cookie show function is kinda strange. Tongue It opens a new tab, even though that is not even within their developer thingy. *shrug*
#7

[eluser]GlennJ[/eluser]
I get a lovely "Could not get the cookie information." alert when trying it on my site... joy!

:-S
#8

[eluser]GlennJ[/eluser]
OK, I have worked this out...

Basically the session was getting destroyed as the user agent didn't match! For some reason when I got redirected back from PayPal IE8's agent string was different!

The session had
Code:
"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0;"

but the browser gave
Code:
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;"

As you can see, one says "MSIE 8.0" and the other "MSIE 7.0"!!!!???? This must be something to do with IE's compatibility mode I'm presuming.

Setting
Code:
$config['sess_match_useragent']    = FALSE;
fixed it.
#9

[eluser]Vitthal[/eluser]
Hi Simon,
i am having one problem related to IE 8 session.
I am using IE 8 for my web but it randomly shows me an error 'Session expired' and diverts me to the session expired page of my project , while i have kept session timeuot=500 in my web.config file. It works really very fine on IE 7.

Currently i am using WIN XP SP2 , .Net Framework 2.0 , IIS V5.1 ,AJAX.

The problem really stuck my work since last one n half month n still i dont have a solution.
DO u have any idea please help me.

Thanks in advance.
#10

[eluser]Thorpe Obazee[/eluser]
Have you tried checking the server time and the local machine's time?




Theme © iAndrew 2016 - Forum software by © MyBB