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

Store PHP session data on disk #3160

Open
jiru opened this issue Feb 4, 2025 · 0 comments
Open

Store PHP session data on disk #3160

jiru opened this issue Feb 4, 2025 · 0 comments
Labels
enhancement Issue that describes a problem that requires a change in the current functionalities of Tatoeba. maintenance Issue that keeps the code base clean and does not change anything from the users point of view.

Comments

@jiru
Copy link
Member

jiru commented Feb 4, 2025

The current setup of Tatoeba is to store all session data in memcached. I am not sure why it has been setup that way, but that approach has several drawbacks:

  1. Session data is lost whenever the server is restarted, so everybody has to login again after a maintenance, no matter how fast it went out.
  2. It is not possible to track which sessions a specific user has opened.

So my proposed solution is to switch to storing session data in database instead.

This will solve #2398, too.

@jiru jiru added enhancement Issue that describes a problem that requires a change in the current functionalities of Tatoeba. maintenance Issue that keeps the code base clean and does not change anything from the users point of view. labels Feb 4, 2025
jiru added a commit that referenced this issue Feb 4, 2025
This is a first step to switch to storing PHP session
data into the database in a seamless way.

Setting php_admin_value[session.save_handler] in php.ini has the effect
of preventing changing session.save_handler at run time. We need to get
rid of that, so that we can use a custom session handler. Next, we’ll
be able to switch the session handler from a simple code update.

The memc.sess.key. prefix seems to be the default prefix used by PHP,
which I discovered using tcpdump.

Refs #3160.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue that describes a problem that requires a change in the current functionalities of Tatoeba. maintenance Issue that keeps the code base clean and does not change anything from the users point of view.
Projects
None yet
Development

No branches or pull requests

1 participant