Welcome Guest, Not a member yet? Register   Sign In
Sessions Lost after every refresh in IE7
#1

[eluser]Guest[/eluser]
Hi guys,

i'm having a really strange problem -

I have setup my sessions to use a database.

In Firefox, and on another machine in IE8 - it's working fine.

But on the same machine firefox is installed, when using IE7, My codeigniter project will not keep sessions.

The data is being stored in the ci_sessions table in my database, but when you refresh the page, just another row is added to the database, instead of it using the previous data.

Here you can see, the data is going into the database great, but it is not linking backup the next time:

[Image: mydb.gif]

I do not see how this can be my code, as it works fine in the the other browsers - i have also scanned and remove any place where the session could be unset.

Are sessions based on cookies at all? Or is it totally loaded from the database. I did have a quick look at the wiki at other sessions libaries, but they were from years ago, so im guessing the new ci session libary is better then any alternative.

Thanks for any help getting this working :-)

Regards,
#2

[eluser]Guest[/eluser]
Right,

After trying EVERY alternative session libary offered in the wiki -- i found one that works!

http://codeigniter.com/wiki/EckoSession/

Is the only one that stores data in a database, and uses native PHP-Session-Handling, and WORKS in all browsers and pc's i've tried. Great stuff :-)

A lot of the session libaries are out-of-date now - using hte old style of before 1.6(?), with a init folder??? The rest just didnt work for me :-(

Anyway, if anyone is ever having problems - try the one above.

Cheers all!
#3

[eluser]n0xie[/eluser]
If only this problem was discussed before. Oh wait it has. Like a million times. It's a bug in IE's implementations of Cookies.
#4

[eluser]Guest[/eluser]
That was a helpful post. Oh wait it wasn't.

I searched the forum, and i did a lot of checks before i posted - all other posts looked like they were from over a year ago. So i thought it might have been fixed.

ALSO - it now lets other try EckoSession first instead of going through all the others that do not work, and getting confused by "init" folders etc, that do not even exist any more.

;-)
#5

[eluser]n0xie[/eluser]
Just remove the underscore from the cookie name, and make sure your server time is correct and the problem magically goes away.

I apologize if I came across annoyed, but I'm rather tired of reading daily new posts about session problems when only Microsoft is to blame. Especially if the answer has been given quite a few times.
#6

[eluser]Guest[/eluser]
I understand it must be annoying for regular users of a forum to have newbie’s come and ask the same questions all the time.

[quote author="n0xie" date="1264175179"]Just remove the underscore from the cookie name, and make sure your server time is correct and the problem magically goes away.
[/quote]

Thank you for your help! I’m going to stick with EckoSession for now. It’s working – and i don’t want to risk it changing it. I also don't think i can fix the server time on hostgator (shared hosting) :-(

[quote author="n0xie" date="1264175179"]
I apologize if I came across annoyed, but I'm rather tired of reading daily new posts about session problems when only Microsoft is to blame. Especially if the answer has been given quite a few times.
[/quote]

Sorry if i did :-)

I just hate searching forums, then you find a post that looks like it might contain the answer you need -- but the only reply is "Try using search next time", or something along those lines. It just makes it harder to find stuff, as the original post is pushed deeper into the search results. That's why i like to post the steps i used to get somthing to work - then in the future, if someone finds my post, it will be helpful. Anyway, i'm ranting a bit ;-)

Cheers!




Theme © iAndrew 2016 - Forum software by © MyBB