← Back to team overview

mahara-contributors team mailing list archive

[Bug 1736843] A change has been merged

 

Reviewed:  https://reviews.mahara.org/8380
Committed: https://git.mahara.org/mahara/mahara/commit/c26a140ea5a028f3f04dc41e23d2ebdb61f48f1b
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch:    17.10_STABLE

commit c26a140ea5a028f3f04dc41e23d2ebdb61f48f1b
Author: Cecilia Vela Gurovic <ceciliavg@xxxxxxxxxxxxxxx>
Date:   Thu Dec 7 16:53:54 2017 +1300

Bug 1736843: recreate the sessions dirs when clear_all_caches deletes
them

when calling clear_all_caches(true), the dataroot/sessions
directories will be deleted
we recreate them again at that moment instead of
waiting until the Session checks

behatnotneeded

Change-Id: I1ea2318cda4743d4908f5cb51990b02aa385a1ea

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1736843

Title:
  Missing directories in <sitedata>/sessions makes login fail

Status in Mahara:
  Fix Committed
Status in Mahara 17.10 series:
  Fix Committed
Status in Mahara 18.04 series:
  Fix Committed

Bug description:
  In <sitedata>/sessions there should be directories named 0,1,2,..9,a,b..,f
  There should always be all of them present, if they are not there we create them. 
  When we check the sessions dir, we assume there could be only two possibilities: We have all of them or we have none. That's why we only check for the first one (0). 
  In the case where some of these directories are missing, but the 0 is present, we will see the following error when we try to login:

  "Mahara: Site unavailable
  Something in the way you're interacting with Mahara is causing an error.
  Details if any, follow:

  Logged out user can not be stored in usr_session"


  Call stack (most recent first):

      log_message("session_regenerate_id(): Failed to create(read) se...", 8, true, true, "/home/ceciliavg/maharacode/maharatest/htdocs/auth/...", 507) at /home/ceciliavg/maharacode/maharatest/htdocs/lib/errors.php:521
      error(4096, "session_regenerate_id(): Failed to create(read) se...", "/home/ceciliavg/maharacode/maharatest/htdocs/auth/...", 507, array(size 0)) at Unknown:0
      session_regenerate_id(true) at /home/ceciliavg/maharacode/maharatest/htdocs/auth/session.php:507
      Session->regenerate_id() at /home/ceciliavg/maharacode/maharatest/htdocs/auth/user.php:1681
      LiveUser->authenticate(object(stdClass), "1") at /home/ceciliavg/maharacode/maharatest/htdocs/auth/user.php:1518
      LiveUser->login("admin", "********") at /home/ceciliavg/maharacode/maharatest/htdocs/auth/lib.php:1520
      login_submit(object(Pieform), array(size 6)) at /home/ceciliavg/maharacode/maharatest/htdocs/lib/pieforms/pieform.php:542
      Pieform->__construct(array(size 9)) at /home/ceciliavg/maharacode/maharatest/htdocs/lib/mahara.php:5022
      pieform_instance(array(size 9)) at /home/ceciliavg/maharacode/maharatest/htdocs/auth/lib.php:521
      auth_setup() at /home/ceciliavg/maharacode/maharatest/htdocs/init.php:389
      require("/home/ceciliavg/maharacode/maharatest/htdocs/init....") at /home/ceciliavg/maharacode/maharatest/htdocs/index.php:16

  [WAR] 46 (auth/session.php:510) session_regenerate_id() failed
  Call stack (most recent first):

      log_message("session_regenerate_id() failed", 8, true, true) at /home/ceciliavg/maharacode/maharatest/htdocs/lib/errors.php:95
      log_warn("session_regenerate_id() failed") at /home/ceciliavg/maharacode/maharatest/htdocs/auth/session.php:510
      Session->regenerate_id() at /home/ceciliavg/maharacode/maharatest/htdocs/auth/user.php:1681
      LiveUser->authenticate(object(stdClass), "1") at /home/ceciliavg/maharacode/maharatest/htdocs/auth/user.php:1518
      LiveUser->login("admin", "********") at /home/ceciliavg/maharacode/maharatest/htdocs/auth/lib.php:1520
      login_submit(object(Pieform), array(size 6)) at /home/ceciliavg/maharacode/maharatest/htdocs/lib/pieforms/pieform.php:542
      Pieform->__construct(array(size 9)) at /home/ceciliavg/maharacode/maharatest/htdocs/lib/mahara.php:5022
      pieform_instance(array(size 9)) at /home/ceciliavg/maharacode/maharatest/htdocs/auth/lib.php:521
      auth_setup() at /home/ceciliavg/maharacode/maharatest/htdocs/init.php:389
      require("/home/ceciliavg/maharacode/maharatest/htdocs/init....") at /home/ceciliavg/maharacode/maharatest/htdocs/index.php:16

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1736843/+subscriptions


References