-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session Lost for CI 3.1.13 on Page Refresh #6248
Comments
I had a similiar (maybe same) issue with the session cookies not being set, being samesite none and secure none on a localhost with self-signed ssl cert. Even on localhost the browsers did not like that. Chrome did not set the cookie at all and Safari made it samesite lax. Now it works when I use mkcert in my docker dev environment and on my mac host, so I have a valid cert everywhere. And cookie secure set to true. |
I don't think it's an issue, I couldn't replicate it (see the aforementioned discussion). |
No, not an CI issue. It is just a matter of many browsers not accepting cookies with samesite none combined with non-secure (http or https self-signed cert). A configuration issue. |
@mertdogan check your log files -> you should have errors with this configuration: also, take a look at this article: in short: a session with SameSite=None without the Secure parameter will not be saved in the browser's cookie jar, so your session will be new with every page refresh |
@mertdogan I tried the same thing, it works for me on localhost using 8.3 but not on Azure Web services |
Discussed in #6247
Originally posted by mertdogan November 14, 2023
Hi. I started a new CI project with CI 3.1.13.
When i refresh page everything on session lost (still on database table) and new session created.
I replaced my new system/library/session folder with CI 3.1.11 (ini_set('session.id', $params['cookie_name']); tricked) and everything works without problem and session not lost.
my simple code at controller is:
when i refresh page for CI3.1.13 than NULL 123 occurs but when i load with CI3.1.11 123 123 occurs on second page load.
I test everything on stackoverflow but can't solve problem.
my php version is 7.1.19 on IIS and using database driver for session. This is my config setting:
The text was updated successfully, but these errors were encountered: