Skip to content
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_create_id() fails when an active session exists #480

Open
ellotheth opened this issue Mar 4, 2021 · 3 comments
Open

session_create_id() fails when an active session exists #480

ellotheth opened this issue Mar 4, 2021 · 3 comments

Comments

@ellotheth
Copy link

PHP 7.4.15
Memcached 3.1.5
libmemcached 1.0.18
Test script and config details: https://gemma.wonderproxy.com/session.php

I'm using Memcached to back my login sessions (session.save_handler=memcached). I don't have session locking enabled (memcached.sess_locking=Off). session_create_id() works when there is no active session, and fails with a warning when there is an active session:

Warning:  session_create_id(): Failed to create new ID

If I swap to session.save_handler=files, session_create_id() works as expected in both cases. Session operations outside of session_create_id() work as expected (it's currently powering logins with no warnings or other errors).

I'm not sure if the problem is on my side or the Memcached side, so any insight would be much appreciated. If you need more information, let me know.

@heldchen
Copy link

heldchen commented Apr 22, 2021

experiencing the same on 8.0 - were you able to work around this?

@ellotheth
Copy link
Author

were you able to work around this?

Nope. In our case there's a "graceful" fallback, so I set up our log monitors to ignore this warning. 🤷‍♀️

@heldchen
Copy link

oh well. thanks! my workaround is to keep using redis as the session storage, which works fine with session_create_id() for already active sessions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants