Public bug reported:

Issue: keep getting prompted to login

some of the later conversation about the issue:

<robertl> in htdocs/init.php we set up $USER
<robertl> then hit the auth_setup() function
<rellwood> what file does auth_setup() live in?
<robertl> htdocs/auth/lib.php
<rellwood> WHAT THE...?  It suddenly and mysteriously started working!
<rellwood> I added a trivial line in lib.php: 
log_debug($USER->get('sessionid'));
<rellwood> and as I click around it's not asking me to login anymore.
<robertl> ok sounds like one of the log_debug() calls is setting things 
correctly to session so the session exists 
<rellwood> what the heck?
<robertl> I suspect if you remove the log_debug() lines the session issue will 
come back
<robertl> it's forcing the staring of a session 
<rellwood> This is in auth/lib.php, around line 396: 
log_debug($USER->get('sessionid'));
<robertl> yeah there is a bit in lib/errors.php that check to see if session 
doesn't exist and starts it
<robertl> for the debugging output
<robertl> this bit:     if (!$SESSION && function_exists('get_config') && $CFG) 
{
<robertl>         require_once(get_config('docroot') . 'auth/session.php');
<robertl>         $SESSION = Session::singleton();
<robertl>     }
<rellwood> Yes, that's confirmed.  I removed the other log_debug lines except 
that one: still works.  Removed that one: doesn't work.  put it back: works 
again
<robertl> so ok we know mahara will work on your system if the session is 
started correctly
<robertl> so now we need to know why it isn't
<rellwood> exactly.


So this is where we are at - the session does not seem to be restarted 
correctly unless we add a log_debug() line in auth_setup() function - which 
restarts the session if it is not started.

I suspect either the session is started correctly but then is destroyed
before reaching auth_setup() or the session is not started correctly in
htdocs/init.php

** Affects: mahara
     Importance: Undecided
         Status: New

-- 
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/1675166

Title:
  Issue with FreeBSD hosted site where one keeps getting prompted to
  login on nvaigating to new page

Status in Mahara:
  New

Bug description:
  Issue: keep getting prompted to login

  some of the later conversation about the issue:

  <robertl> in htdocs/init.php we set up $USER
  <robertl> then hit the auth_setup() function
  <rellwood> what file does auth_setup() live in?
  <robertl> htdocs/auth/lib.php
  <rellwood> WHAT THE...?  It suddenly and mysteriously started working!
  <rellwood> I added a trivial line in lib.php: 
log_debug($USER->get('sessionid'));
  <rellwood> and as I click around it's not asking me to login anymore.
  <robertl> ok sounds like one of the log_debug() calls is setting things 
correctly to session so the session exists 
  <rellwood> what the heck?
  <robertl> I suspect if you remove the log_debug() lines the session issue 
will come back
  <robertl> it's forcing the staring of a session 
  <rellwood> This is in auth/lib.php, around line 396: 
log_debug($USER->get('sessionid'));
  <robertl> yeah there is a bit in lib/errors.php that check to see if session 
doesn't exist and starts it
  <robertl> for the debugging output
  <robertl> this bit:     if (!$SESSION && function_exists('get_config') && 
$CFG) {
  <robertl>         require_once(get_config('docroot') . 'auth/session.php');
  <robertl>         $SESSION = Session::singleton();
  <robertl>     }
  <rellwood> Yes, that's confirmed.  I removed the other log_debug lines except 
that one: still works.  Removed that one: doesn't work.  put it back: works 
again
  <robertl> so ok we know mahara will work on your system if the session is 
started correctly
  <robertl> so now we need to know why it isn't
  <rellwood> exactly.

  
  So this is where we are at - the session does not seem to be restarted 
correctly unless we add a log_debug() line in auth_setup() function - which 
restarts the session if it is not started.

  I suspect either the session is started correctly but then is
  destroyed before reaching auth_setup() or the session is not started
  correctly in htdocs/init.php

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

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to