Welcome Guest, Not a member yet? Register   Sign In
Session Class/Session Hybrid
#1

[eluser]Dan Allen (Houston, TX)[/eluser]
Hi,

Trying to find out whether I need to keep running CI Session Hybrid.

I have been working on a CI system that has a special extension to the CI_Session class, for dealing with problems related to Internet Explorer and session cookies. This is CI 1.7.1

However, I also am starting work on a brand new CI system, running CI 2.1

Is there still a problem with vanilla CI_Session that requires the Session Hybrid?

Any comments or assistance will be extremely much appreciated.

Thank you,
Dan

#2

[eluser]Unknown[/eluser]
Hi there,
I've just today stumbled on the Internet Explorer sessions problem, and having upgraded my System to version 2.1 it looks like this hasn't been solved yet, so I'll be looking into using Session Hybrid also.
#3

[eluser]InsiteFX[/eluser]
The problem with IE is that the user needs to set up the cookies in it, also IE does not like the underscore in some versions!

This is not a CodeIgniter session problem.
#4

[eluser]Dan Allen (Houston, TX)[/eluser]
[quote author="InsiteFX" date="1334845768"]The problem with IE is that the user needs to set up the cookies in it, also IE does not like the underscore in some versions!

This is not a CodeIgniter session problem.
[/quote]

Thanks for the comment. What underscore are you referring to?

#5

[eluser]Dan Allen (Houston, TX)[/eluser]
[quote author="InsiteFX" date="1334845768"]The problem with IE is that the user needs to set up the cookies in it, also IE does not like the underscore in some versions!

This is not a CodeIgniter session problem.
[/quote]

Does IE accept php session cookies but not CI cookies?
#6

[eluser]InsiteFX[/eluser]
Code:
$config['sess_cookie_name'] = 'cisession';   // see how I took out the underscore.

1) IE menu - tools - internet options
2) Click on the Privacy tab - then Advanced button
3) Check your cookie settings and make sure that Always allow session cookies is CHECKED!
#7

[eluser]skunkbad[/eluser]
I'm amazed that the underscore hasn't been removed in the distribution. I've never had problems with the session class and IE, but I always removed the underscore. Is a cookie only considered a session cookie if it is a persistent cookie? Aren't these cookies allowed by default?
#8

[eluser]InsiteFX[/eluser]
Hi skunkbad,

It really depends on where the computer system was purchased, I have seen some companies block cookies so that they do not have to deal with users messing up the system.

When I built my new system with Windows 7 Pro 64-bit CI would not see the cookies until I went into IE and told it to use session cookies! It really depends onn the users Security and Privacy settings in IE which will change the cookies settings on the fly...
#9

[eluser]skunkbad[/eluser]
Hi InsiteFX,

I'm assuming by "session" cookies we are talking about persistent cookies. So, perhaps it is necessary to try to detect if the browser accepts cookies. I do this already like this:

Code:
[removed]
$(document).ready(function() {
  var cookie_checker = navigator.cookieEnabled ||
   ("cookie" in document && ([removed].length > 0 ||
   ([removed] = "test").indexOf.call([removed], "test") > -1));

  if( ! cookie_checker ){
   $('#alert-bar').html('<?php echo addslashes( $message ); ?>').show();
  }

  $('#alert-bar').click(function(){
   $(this).slideUp();
  });
});
[removed]

But I haven't done any testing to know if this would detect if persistent cookies are disabled. What are you doing? To some degree I figure that somebody that has cookies turned off is already wondering why half the internet doesn't work for them.
#10

[eluser]InsiteFX[/eluser]
Hi skunkbad,

I use jQuery cookie to try to write out a cookie if it fails then the user either has javascript turned off or cookies disabled or both.




Theme © iAndrew 2016 - Forum software by © MyBB