Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-61527

$CFG->dbsessions can get stuck "on"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Minor
    • None
    • 3.3.4
    • Administration
    • None
    • Any
    • MOODLE_33_STABLE
    • Hide

      configure moodle instance to be using db sessions. this admin task and any others described here are documented in the main moodle doc set:
      https://docs.moodle.org/33/en/Session_handling

      validate that $CFG->dbsessions is set through the admin sessions interface:
      site admin > server > session handling

      then update config.php to use a different method for holding sessions. after restarting the server go to the same admin page and you will not see anything there for dbsessions. but if you can check the db for where the variable is stored, you will find that it is still set (but now incorrectly so).

      Show
      configure moodle instance to be using db sessions. this admin task and any others described here are documented in the main moodle doc set: https://docs.moodle.org/33/en/Session_handling validate that $CFG->dbsessions is set through the admin sessions interface: site admin > server > session handling then update config.php to use a different method for holding sessions. after restarting the server go to the same admin page and you will not see anything there for dbsessions. but if you can check the db for where the variable is stored, you will find that it is still set (but now incorrectly so).

    Description

      let's say a moodle instance exists that uses db sessions. and then this same instance is going to change where sessions are kept to outside of the database. this change is made in the existing instance by updating the config.php file with the new specifics of the session store.

      this is in the docs:
      https://docs.moodle.org/33/en/Session_handling

      but once this is done, $CFG->dbsessions will remain selected as the admin page essentially shuts a user out of being able to change this with admin settings web page.

      i suggest a patch to the code in admin/settings/server.php around line 40. here's the current code:

      {{// "sessionhandling" settingpage
      $temp = new admin_settingpage('sessionhandling', new lang_string('sessionhandling', 'admin'));
      if (empty($CFG->session_handler_class) and $DB->session_lock_supported()) {
      $temp->add(new admin_setting_configcheckbox('dbsessions', new lang_string('dbsessions', 'admin'), new lang_string('configdbsessions', 'admin'), 0));

      }

      to fix this, i would add a check to see if $CFG->dbsessions is already set. if so, then i'd display the checkbox.

       
       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              js0000 john saylor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.