Forums | Mahara Community

Support /
Moodle/Mahara Integration issue


anonymous profile picture
Account deleted
Posts: 4

21 October 2009, 2:28

Hi,

I'm trying to integrate moodle 1.9.5 with mahara 1.1.6 and failing at the Add Authority page with what appears to be the usual error retrieving key stuff that a lot of other seem to have but I can't work out what's wrong.

I've enabled networking in both Moodle and Mahara, both sites work fine on there own and I can't see anything in the httpd logs about anything to do with this.

Both site are hosted on the same box and running through https:\\hostname.com\moodle & https:\\hostname.com\mahara. I've specified the correct port number (443) but it won't accept the settings. I've been following the Mahoodle (intergration) PDF and am basically stuck so any assistance would be helpful.

anonymous profile picture
Account deleted
Posts: 1643

22 October 2009, 1:56

Hi,

What exact error are you seeing?

Are you absolutely sure there's nothing in the logs? It can help to tail them while you submit the form, so you can definitely tell if any relevant lines are added.

I note you're running through HTTPS - that can mean that curl requests can fail if your certs are self-signed or otherwise invalid. You could modify the relevant code to make curl not check whether the SSL cert is valid, if you work out that this is the problem. 

anonymous profile picture
Account deleted
Posts: 4

28 October 2009, 1:56

Ahh I'm guessing its the self-signed cert issue.

do you know which Files I need to edit to remove that bit of the Checking

anonymous profile picture
Account deleted
Posts: 1643

28 October 2009, 18:00

Please try this patch and let me know if it works. If it does, I might try adding a configuration option for it: http://paste.dollyfish.net.nz/0f8378


anonymous profile picture
Account deleted
Posts: 4

12 November 2009, 2:27

Okay just tried that patch and it now works.

Thanks for that

anonymous profile picture
Account deleted
Posts: 4

12 November 2009, 3:14

Okay I've finished the integration but now users can move from Moodle to Mahara because of what appears to be a similar SSL Cert error.


[Thu Nov 12 15:11:47 2009] [error] [client an.ip.add.35] [WAR] ef (api/xmlrpc/client.php:87) Curl error: 60:SSL certificate problem, verify that the CA cert is OK. Details:, referer: https://someserver.com/moodle/
[Thu Nov 12 15:11:47 2009] [error] [client an.ip.add.35] [WAR] ef (api/xmlrpc/client.php:87) error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed, referer: https://someserver.com/moodle/
[Thu Nov 12 15:11:47 2009] [error] [client an.ip.add.35] Call stack (most recent first):, referer: https://someserver.com/moodle/
[Thu Nov 12 15:11:47 2009] [error] [client an.ip.add.35]   * Client->send("https://someserver.com/moodle") at /var/www/html/mahara/auth/xmlrpc/lib.php:117, referer: https://someserver.com/moodle/
[Thu Nov 12 15:11:47 2009] [error] [client an.ip.add.35]   * AuthXmlrpc->request_user_authorise("26b5a93adfeee6c3928b951b3b8209c34bd0622d", "https://someserver.com/moodle") at /var/www/html/mahara/auth/xmlrpc/land.php:95, referer: https://someserver.com/moodle/
[Thu Nov 12 15:11:47 2009] [error] [client an.ip.add.35] , referer: https://someserver.com/moodle/

 

anonymous profile picture
Account deleted
Posts: 7

12 November 2009, 7:25

Try a patch like below. CURL needs a little help with self-signed certs.

*** .//api/xmlrpc/client.php.dist        2009-08-04 17:24:55.000000000 +1000
--- ./api/xmlrpc/client.php     2009-11-02 14:42:38.000000000 +1000
***************
*** 64,69 ****
--- 64,71 ----
          curl_setopt($ch, CURLOPT_USERAGENT, 'Mahara');
          curl_setopt($ch, CURLOPT_POSTFIELDS, $this->encryptedrequest);
          curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml charset=UTF-8", 'Expect: '));
+         curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
+         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

          $timestamp_send    = time();
          $this->rawresponse = curl_exec($ch);
*** ./lib/web.php.dist  2009-08-04 17:24:55.000000000 +1000
--- ./lib/web.php       2009-11-02 13:49:02.000000000 +1000
***************
*** 2570,2575 ****
--- 2570,2577 ----
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
      curl_setopt($ch, CURLOPT_MAXREDIRS, 5);
+     curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
+     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

      curl_setopt_array($ch, $config);

***************

Rolf Kröger's profile picture
Posts: 2

16 November 2009, 20:20

Great! That is really Cool

I patched the new mahara 1.2 as Nigel and Rodney told here. And now it works from moodle to mahara over https with our selfsigned cert.

 Thank you, Nigel and Rodney. Now we will start using/testing mahara.

Yeah, yeah yeah!!

8 results