• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with firefox. ie, chrome, opera all work - something with the session library?

#1
[eluser]deco10[/eluser]
So based on the title this almost seems like an issue with something other than CI and likely a problem with firefox.

With any browser I can log in to my site that I created. I can type in my search box and results are returned as expected..... in firefox only.

After logging in with ie, opera or chrome I'm directed back to the login page. So perhaps firefox is doing something unexpected. I'm using the session library. I don't really know else is required from me to help solve this.

if you feel like helping out, let me know! Smile


Thanks.

#2
[eluser]Maglok[/eluser]
You should understand how it works though, CI sessions do not use the normal session mechanic, they set a cookie called ci_session by default (changebale in the config).

Now if you open your site in a frame IE, for one, will not allow cross domain cookies (if your site is on a different host then the host opening the frame).

It could be anything at this point though. IE/Chrome/Opera are probably resetting your cookie/session though. I'd try to find the value of the session to begin with and see where it changes.

#3
[eluser]deco10[/eluser]
I decided to just use native php sessions. Works fine Smile

Thanks for the info! Smile

#4
[eluser]slowgary[/eluser]
This may be entirely unrelated, but Chrome does not allow local cookies.

#5
[eluser]deco10[/eluser]
So I decided to tough it out and use ci sessions.

I thought I had it fixed but the problem persists.

The logged in session only works in firefox (likely due to something with cookies, I know) but I can't figure out what I need to do on the server end to get this working.

Always works in FF, never in IE, Ch, or O.

Any help would be greatly appreciated. Oh and one thing I noticed is when I was running this on a local server on my pc, it never gave me a hard time, but when I try to access it from another pc thats when the problem occurs.


Regards,

Code:
function myfunc()
     {                      
        if(!$this->session->userdata('logged_in')):
          $this->_login_user();
        endif;

     //test to see if user has previously logged in  
     if($this->session->userdata('logged_in')
     {
                //do stuff
        }
       else
        {

                //redirect to login page

        }

}

#6
[eluser]slowgary[/eluser]
Are you storing anything else in the session? Remember there's a 4kb limit. Have you tried storing your sessions in a database table?

#7
[eluser]deco10[/eluser]
Thanks for your help everybody. Nobody was even close and I'm completely bewildered Smile

The solution is here:
http://ellislab.com/forums/viewthread/63278/


Who would have guessed my system clock being off by a few hours would cause me such a headache Smile

#8
[eluser]JoostV[/eluser]
If sessions do not work cross browser, always check your server clock Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.