core icon indicating copy to clipboard operation
core copied to clipboard

Support for custom session wrappers

Open ringmaster opened this issue 12 years ago • 3 comments

It would be desirable to create an app that can implement PHP's session wrapper to use an alternative storage system for sessions (such as MongoDB or Redis). Unfortunately, OC::initSession() is called before apps are loaded, which precludes custom session handlers from being registered prior to calling session_start().

It may be ideal to introduce a new app type to ownCloud apps of "session", which could be loaded before OC::initSession() is called (in base.php)) to make available and register a session wrapper class. Alternatively, allowing the config to specify an alternate class to use for session handling could solve this issue.

ringmaster avatar Feb 20 '14 19:02 ringmaster

@icewind1991 Any idea?

karlitschek avatar Feb 21 '14 15:02 karlitschek

I'd suggest to read the session handler class from the config. Classes can be loaded from apps before they are loaded.

DeepDiver1975 avatar Feb 21 '14 15:02 DeepDiver1975

@DeepDiver1975 PR has been merged. can this be closed?

butonic avatar Jul 16 '14 14:07 butonic