Forums | Mahara Community

Mahara/Moodle integration /
Connecting, but not logging in


anonymous profile picture
Account deleted
Posts: 5

24 August 2010, 14:58

I just upgraded to Mahara 1.2.5 yesterday, and now the Moodle/Mahara link is not working.  We haven't changed anything else, so I'm guessing that there's some setting that got changed or that I didn't tweak.  I've gone through the Mahoodle doc again, and re-saved all of the settings.  I'm running on OSX, my libxml is current, so the two commone causes listed are not the problem.

The thing that confuses me is that when I use a new user on Moodle and try to connect, the account is created on Mahara, but I'm shown a login screen and am not logged in automatically.  Does anyone have a place I can start looking?  I'm not even sure where to go to debug this.  I could really use some help.

Thanks,

Nate Baxley

anonymous profile picture
Account deleted
Posts: 5

25 August 2010, 13:26

I still haven't solved this, but I've dug into the code to try and figure out where things are breaking.  In the /auth/xmlrpc/land.php, I can confirm that the user ($USER) is getting logged in and $auth->request_user_authorise  is returning true.  But when I get to the index.php page, the $USER is showing as not logged in, though $SESSION->is_live() is true.  I'm still trying to track down where it breaks, but I'd love to have any input from someone who has worked on this more.

anonymous profile picture
Account deleted
Posts: 5

25 August 2010, 16:39

OK, I'm still not sure why the upgrade from 1.1 to 1.2 brought this to the surface, but I've been able to fix the problem.

The issue that was happeing had to do with the path of the session cookies.  They were being set to the path of the script that was creating them.  So the xmlrpc login was createing a cookie at /auth/xmlrpc which wasn't visible to the main site pages.

I tracked the issue down to the get_mahara_install_subdirectory function returning an empty string.  In the config page, it says that wwwroot is not required, but maybe helpful.

THE SOLUTION:
Set the wwwroot in the config.php page to be the address of your site and be sure to include the trailing /. 

Woked for me anyway.  I've tried it on 2 sites and it fixed the problem on both.  I'll try the third trouble site tomorrow and see what happens.

Kristina Hoeppner's profile picture
Posts: 4863

26 August 2010, 2:06

Hello Nate,

Great that you figured out your problem and shared your solution.  I hope you have better luck at the next upgrade.

Cheers

Kristina

4 results