Session Stores in DB for unique login

Session Stores in DB for unique login

by santosh Suwarnkar -
Number of replies: 2

Hello,

    I want to install unique login plugin, for that prerequisite is session stores in databaase

so Administration > Site administration > server > Session handling 

and Use database for session information  value checked and submited then admin automatically loggedout nothing has been set in database.

Also I could not able to set debug mode on

Moodle 3.0.2+ (Build: 20160114)


Thanks

Santosh K. Suwarnkar


Average of ratings: -
In reply to santosh Suwarnkar

Re: Session Stores in DB for unique login

by Jamie Kramer -

Hello Santosh.

You were logged out automatically because you changed the session store. If you were logged in with admin and changed the session store, then it is normal that you would get logged out because admin doesn't have a valid session in the db yet. You would have to log back in for a valid session to get saved to the db.

Also make sure if you use MySQL that "make sure that 'max_allowed_packet' in my.cnf (or my.ini) is at least 4M"

You can set debug in config.php if needed, check out config-dist.php for examples of how to enable debug via config.php. You might need to restart Apache (if using PHP as apache module + opcache) or restart php fpm.

// Force a debugging mode regardless the settings in the site administration

// @error_reporting(E_ALL | E_STRICT); // NOT FOR PRODUCTION SERVERS!

// @ini_set('display_errors', '1');    // NOT FOR PRODUCTION SERVERS!

// $CFG->debug = (E_ALL | E_STRICT);   // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS!

// $CFG->debugdisplay = 1;             // NOT FOR PRODUCTION SERVERS!


Maybe I need more information about the current problem. Is admin not able to log in at all after changing to db sessions? I think you are on the correct path of wanting to enable debug mode if that is the case.

In reply to Jamie Kramer

Re: Session Stores in DB for unique login

by Jamie Kramer -

Also consider that the "Limit concurrent logins" setting may do what you need.

Site administration / ▶︎ Plugins / ▶︎ Authentication / ▶︎ Manage authentication

screenshot of Limit concurrent logins setting in auth settings