Welcome Guest, Not a member yet? Register   Sign In
lost session in IE browser
#1

[eluser]CI_expert_indian[/eluser]
Hello every one ....

I am using CI for my application .. but I am facing a strange problem ... I logged in correctly in the application but when i redirect to any other page my user data from session lost.... this happen at Linux server and happen for all browser at client side except FF... the same code is working fine if i use window based server .Please any idea ??
#2

[eluser]Ayeyermaw[/eluser]
what version of CI are you using now?
Did you upgrade from a pervious version?

This problem can occur when you're saving sessions to the database and your user_agent field on the sessions table is too small. Make sure it is like so:
Code:
CREATE TABLE IF NOT EXISTS  `ci_sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(16) DEFAULT '0' NOT NULL,
user_agent varchar(120) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text NOT NULL,
PRIMARY KEY (session_id),
KEY `last_activity_idx` (`last_activity`)
);

Also check that you are not putting too much into the cookie as I believe this can blow the limit (default 4k) and then you could have similar problems
#3

[eluser]CI_expert_indian[/eluser]
Thanks sir for your reply . All check that describe by you ..... i think there is another problem and it is harassing me so much ...:offfff
#4

[eluser]boltsabre[/eluser]
Google it, I've seen this issue crop up a few times, but cannot remember the exact fix for it. Does your cookie name have an 'underscore or hyphan (_ or -)...? That seems to ring a bell.
#5

[eluser]LuckyFella73[/eluser]
The info about the underscore can be found in many posts and
thats why I thought as well that can be an issue for a long time
wondering why the default value in config.php was not changed
after many user having trouble with that underscore ...

But later I found this old post of Derek Jones:
http://ellislab.com/forums/viewreply/459874/

Don't worry about the underscore Wink
#6

[eluser]CroNiX[/eluser]
And yet they still haven't fixed the core issue that removing the underscore seems to "fix" in the 4 years since that was posted, and, if they've discovered the cause and how to prevent it they haven't documented it anywhere in the user guide, so it must be a secret. Who cares if an underscore in a cookie name is "valid" if CI doesn't handle it properly in all instances, which contributes to instability. There is plenty of evidence that removing the underscore in CI's cookie name fixes problems that users specific to IE have, when using CI, because when they remove it the problem suddenly goes away. We can debate whether its valid or not until the cows come home, but that doesn't change the fact that it is still a pretty serious flaw in the framework that affects many people and STILL hasn't been addressed in these 4 years or longer. Just like the session w/ajax issue that people have to hack around in order to make sessions work as they "should" and not lose their session data. That's been an ongoing issue for about the same length of time, if not longer. This is 2012. People use sessions and ajax.

@Ayeyermaw Changing the length of the user_agent field won't do much good, because internally CI chops them off at 120 chars when making comparisons anyway, so you would need to change it in the code as well for that to be effective.
#7

[eluser]Learn CodeIgniter[/eluser]
The reason the underscore will not work in an IE cookie name is because IE converts the underscore to F hex digits
Code:
// so _ becomes F
cookie  name ci_session - becomes ciFsession
#8

[eluser]LuckyFella73[/eluser]
@CroNiX
Maybe you are right. I just really don't get why the core and docs are not updated then. I mean the expression engine must make use of sessions and ajax too. And ellislab can't be interested in disappointed customers for their apps using sessions and ajax don't work with IE. Hard to understand that such a tiny bugfix is not made then.
#9

[eluser]CI_expert_indian[/eluser]
Guys I am still shaking my head ........Smile
#10

[eluser]CI_expert_indian[/eluser]
Every thing is fine for window server ....this happens only when i upload my script on Linux server .........any one with magis stick plzz ....?




Theme © iAndrew 2016 - Forum software by © MyBB