Losing session in Firefox when redirect to other page |
Hi all,
I use CI Lib. session to do the login function. It is always lost when I go to other page Note that it happens just in Firefox (using FF38.0.5). In Chrome is ok This is my configuration: Code: $config['sess_driver'] = 'files'; and loaded in every Controller: Code: $this->load->library('session'); I changed config to database as: Code: $config['sess_driver'] = 'database'; and make the data as: Code: CREATE TABLE IF NOT EXISTS `ci_sessions` ( still same problem. Anyone help!!?? Thanks so much
I had a problem with firefox logins and sessions too a while ago and although I cannot recall the exact solution I am sure one of the things I did was to remove the underscores from the cookie names. I hope that helps :=)
(06-22-2015, 05:55 PM)PaulD Wrote: I had a problem with firefox logins and sessions too a while ago and although I cannot recall the exact solution I am sure one of the things I did was to remove the underscores from the cookie names. I hope that helps :=) That couldn't possibly help, not in the way you think it does. If it does, it's not because of the underscores, but because of a collision and changing the cookie name in any way would "help".
How do you call the page eg. Ajax?
Someone on the IRC had the same problem (12 days ago). Problem was the ajax request. The request was from a other domain. Problem called Same origin policy https://en.wikipedia.org/wiki/Same-origin_policy Solution http://caniuse.com/#feat=cors http://stackoverflow.com/questions/35062...71#9523871 header("Access-Control-Allow-Origin: http://foo.example"); in the Controller. http://foo.example is the ajax site. |
Welcome Guest, Not a member yet? Register Sign In |