Welcome Guest, Not a member yet? Register   Sign In
Session in Cookie: Flashdata delayed, Session OK. Session in DB: Flashdata OK, Session Lost
#1

[eluser]Hampti[/eluser]
Hello,

i am struggling with a problem concerning sessions in Codeigniter. I am at the end with my ideas, so maybe someone can help? In my applications i use flashdata for status messages and sessions for storing userdata and authentication.

In short, my problem is:

If i use cookies to store session data, my flashdata is shown delayed. Not as intended by the next http-request, but one after that. It does work with userdata, but my flashdata is simply 'one request too late'. Using cookies, my session though will work as intended.

If i use session data in database, i loose my session on a regular basis. Though its unpredictable and not reproducable, my session gets cleared from time to time for no obvious reason. But now: my flashdata works as intended showing up the "next" request.

I am fighting this phenomena in various applications since 1.7.2 up to now. I read a lot about it, followed several suggestions concerning ajax calls and so on... nothing helped.

I can do a workaround and use userdata instead or other methods instead of flashdata. But i liked the concept and would prefer to use it. The lost session is worse, its not an option using cookies for some applications. The only solution i found so far is session expiration set to zero.

I don't know where i could start digging for an solution. Maybe anybody has an idea or already encountered this or a similar problem?

Thanks & Best Regards
Constantin





Theme © iAndrew 2016 - Forum software by © MyBB