glpi icon indicating copy to clipboard operation
glpi copied to clipboard

Drop handling of custom GLPI session files directory

Open cedric-anne opened this issue 1 year ago • 3 comments

Q A
Bug fix? no
New feature? no
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets -

I guess that the handling of a custom session files directory was made to be able to easilly share the session files accross multiple servers in a load-balanced configuration. IMHO, this is not a good solution for this problem. Indeed, there are many ways to do it without requiring this custom implementation:

  1. It is possible to change the PHP session.save_path configuration in order to save session files on a shared NFS.
  2. It is possible to change the PHP session.save_handler configuration in order to use a handler that would be able to share data accross different servers, for instance Redis.
  3. It is possible to configure the load balancer to force the user to stay on the same server. It is a basic load balancer feature and I guess it is the best option.

Also, our custom implementation may lead to unexpected issues (see https://github.com/glpi-project/glpi/issues/13841#issuecomment-2172881738 for instance).

cedric-anne avatar Jun 17 '24 10:06 cedric-anne

Sounds a good idea to remove this specific code; I have no idea why it's been done like this originally; but it's very old code :)

trasher avatar Jun 17 '24 11:06 trasher

It's necessary to wait for feedback from several customers / partners / users before merging this change which has a strong impact on the sessions.

flegastelois avatar Jun 18 '24 08:06 flegastelois

I'm not sure we'll have feedback before we released a beta or RC :/

trasher avatar Jun 18 '24 09:06 trasher

Postponed.

cedric-anne avatar Jul 09 '24 10:07 cedric-anne