×
R0.24 No Longer Supported
Moodle auth/joomdle not working (DB not updated)
14 years 8 months ago
14 years 8 months ago by Julien.
Topic Author
Moodle auth/joomdle not working (DB not updated) #11
Without the $context, both work fine, that's why I was suspecting some kind of Moodle security restriction.
With the $context, google sends back a "405 Method not allowed", logical.
I can also get the same "faultCode 713..." error message calling:
$response = file_get_contents(" localhost.com:8888/moodle/mnet/xmlrpc/server.php k"); // without $context
And since I can call the Joomdle-Joomla joomdle.getUserInfo, I think the problem is a Moodle (or Joomdle on the Moodle side) configuration.
What more can I test to isolate the problem ? Is there a way to simplify the call ?
Since the "system_check" or "test" do not take arguments, should I be able to call them with a GET request ?
(On my system this actually gives the same error)
$request = xmlrpc_encode_request("auth/joomdle/auth.php/test", array());
$context = stream_context_create(array('http' => array(
'method' => "GET",
'header' => "Content-Type: text/xml ",
'content' => $request
)));
Do you know if there is there a Moodle function I can try to call through XML-RPC with a request like this ?
By the way, I'm using the last 1.9.9+ Moodle version (build 20100728).
Thanks again for your help Antonio!
With the $context, google sends back a "405 Method not allowed", logical.
I can also get the same "faultCode 713..." error message calling:
$response = file_get_contents(" localhost.com:8888/moodle/mnet/xmlrpc/server.php k"); // without $context
And since I can call the Joomdle-Joomla joomdle.getUserInfo, I think the problem is a Moodle (or Joomdle on the Moodle side) configuration.
What more can I test to isolate the problem ? Is there a way to simplify the call ?
Since the "system_check" or "test" do not take arguments, should I be able to call them with a GET request ?
(On my system this actually gives the same error)
$request = xmlrpc_encode_request("auth/joomdle/auth.php/test", array());
$context = stream_context_create(array('http' => array(
'method' => "GET",
'header' => "Content-Type: text/xml ",
'content' => $request
)));
Do you know if there is there a Moodle function I can try to call through XML-RPC with a request like this ?
By the way, I'm using the last 1.9.9+ Moodle version (build 20100728).
Thanks again for your help Antonio!
Please Log in or Create an account to join the conversation.
14 years 8 months ago
Moodle auth/joomdle not working (DB not updated) #12
Do you mean that a similar test, calling joomdle web services in joomla works fine? Same code, with context and everything?
That is even stranger for me, as what it seems is that it is failing to make the connection, so Moodle should not have anything to do.
The error in the logsuggests it cannot fetch the page. When Moodle is not configured to allow the host, it will show xmlrpc related erros. That unless they introduced some changes in latest versions. I have not the time to test now, but will do a new install when I can.
Also I see you are using a non standard port. Don't think it will have anything to do, but I have not tested, so I cannot really be sure.
As for simplifying the call, I don't think that can be done. You need to send the context, because it contains the method to call.
That is even stranger for me, as what it seems is that it is failing to make the connection, so Moodle should not have anything to do.
The error in the logsuggests it cannot fetch the page. When Moodle is not configured to allow the host, it will show xmlrpc related erros. That unless they introduced some changes in latest versions. I have not the time to test now, but will do a new install when I can.
Also I see you are using a non standard port. Don't think it will have anything to do, but I have not tested, so I cannot really be sure.
As for simplifying the call, I don't think that can be done. You need to send the context, because it contains the method to call.
Please Log in or Create an account to join the conversation.
14 years 8 months ago
Topic Author
Moodle auth/joomdle not working (DB not updated) #13
Yes, the following code works just fine :
$username='julien';
$request = xmlrpc_encode_request("joomdle.getUserInfo", array ($username));
$context = stream_context_create(array('http' => array(
'method' => "POST",
'header' => "Content-Type: text/xml",
'content' => $request
)));
$response = file_get_contents(" localhost.com:8888/joomla/xmlrpc/index.php",false k, $context);
What is the last version of Moodle tested on ?
I just compared 1.9.9 from the one I use, there is not change at all in the mnet package...
Out of despair, I tried on port 80 too, but it fails the same way.
I'm going to test right now on another machine.
$username='julien';
$request = xmlrpc_encode_request("joomdle.getUserInfo", array ($username));
$context = stream_context_create(array('http' => array(
'method' => "POST",
'header' => "Content-Type: text/xml",
'content' => $request
)));
$response = file_get_contents(" localhost.com:8888/joomla/xmlrpc/index.php",false k, $context);
What is the last version of Moodle tested on ?
I just compared 1.9.9 from the one I use, there is not change at all in the mnet package...
Out of despair, I tried on port 80 too, but it fails the same way.
I'm going to test right now on another machine.
Please Log in or Create an account to join the conversation.
14 years 8 months ago
Topic Author
Moodle auth/joomdle not working (DB not updated) #14
I installed a fresh Moodle 1.9.9+ on another machine (let's call it B, and let's call my laptop A).
B's configuration:
- LAMP
- PHP 5.3.2
A's configuration:
- MAMP
- PHP 5.2.13 with XML-RPC taken from Moodle bundled MAMP.
Still using only the test script, calling Joomdle service on B from A, it works. Nice to see
Then I installed a fresh Moodle 1.9.9+ on my machine (A) too : calling the new Joomdle service on A from B fails with the same error. Just to make sure it was not a configuration error, I used B's fresh database from A's moodle files : same error.
My conclusion: Something in my environment is causing some problem in the Moodle XML-RPC server.
We are still running some tests here to try to understand exactly what's failing.
B's configuration:
- LAMP
- PHP 5.3.2
A's configuration:
- MAMP
- PHP 5.2.13 with XML-RPC taken from Moodle bundled MAMP.
Still using only the test script, calling Joomdle service on B from A, it works. Nice to see

Then I installed a fresh Moodle 1.9.9+ on my machine (A) too : calling the new Joomdle service on A from B fails with the same error. Just to make sure it was not a configuration error, I used B's fresh database from A's moodle files : same error.
My conclusion: Something in my environment is causing some problem in the Moodle XML-RPC server.
We are still running some tests here to try to understand exactly what's failing.
Please Log in or Create an account to join the conversation.