×
R0.24 No Longer Supported
Moodle auth/joomdle not working (DB not updated)
13 years 8 months ago
13 years 8 months ago by Julien.
Topic Author
Moodle auth/joomdle not working (DB not updated) #1
Hello !
I've been trying to setup Joomdle for a few hours, without success.
I've tried a lot of suggestions from this forum, but nothing worked.
- I use MAMP on OSX, with necessary extensions added. My phpinfo() confirms allow_url_fopen to On and XMLRPC. I've successfully managed to use file_get_contents() on other websites.
- Moodle Network authentication and Joomdle authentications are enabled and configured.
- The Joomla System Check lists all items as green, except Joomdle web services (Moodle Network authentication is not enabled in Moodle). A warning is issued on this same page:
"Warning: file_get_contents([moodle]/mnet/xmlrpc/server.php) [function.file-get-contents]: failed to open stream: HTTP request failed! in [joomla]/administrator/components/com_joomdle/helpers/content.php on line 72"
From what I understand, the auth/joomdle plugin should create a joomdle_dummytable table and update some mnet tables to add its new service. However in my case, nothing is created, event after I configure the plugin (except the config and config_plugins new rows, which are inserted).
I'm not familiar with moodle development, is there a way to force it to run the db/intall.xml ?
I saw in several posts that I should visit "Notifications" after installing or uninstalling the plugin, or making some changes to the DB. Is it the Admin > Security > Notifications tab you're talking of ?
I've been trying to setup Joomdle for a few hours, without success.
I've tried a lot of suggestions from this forum, but nothing worked.
- I use MAMP on OSX, with necessary extensions added. My phpinfo() confirms allow_url_fopen to On and XMLRPC. I've successfully managed to use file_get_contents() on other websites.
- Moodle Network authentication and Joomdle authentications are enabled and configured.
- The Joomla System Check lists all items as green, except Joomdle web services (Moodle Network authentication is not enabled in Moodle). A warning is issued on this same page:
"Warning: file_get_contents([moodle]/mnet/xmlrpc/server.php) [function.file-get-contents]: failed to open stream: HTTP request failed! in [joomla]/administrator/components/com_joomdle/helpers/content.php on line 72"
From what I understand, the auth/joomdle plugin should create a joomdle_dummytable table and update some mnet tables to add its new service. However in my case, nothing is created, event after I configure the plugin (except the config and config_plugins new rows, which are inserted).
I'm not familiar with moodle development, is there a way to force it to run the db/intall.xml ?
I saw in several posts that I should visit "Notifications" after installing or uninstalling the plugin, or making some changes to the DB. Is it the Admin > Security > Notifications tab you're talking of ?
Please Log in or Create an account to join the conversation.
13 years 8 months ago
Topic Author
Moodle auth/joomdle not working (DB not updated) #2
OK, I just found the right "Notifications" menu, which ran the install script.
The Joomla system check still gives the same error, though.
I'm going to check everything again, but if you have any clue...
The Joomla system check still gives the same error, though.
I'm going to check everything again, but if you have any clue...
Please Log in or Create an account to join the conversation.
13 years 7 months ago
Moodle auth/joomdle not working (DB not updated) #3
If you are getting this message
"Warning: file_get_contents([moodle]/mnet/xmlrpc/server.php) [function.file-get-contents]: failed to open stream: HTTP request failed! in [joomla]/administrator/components/com_joomdle/helpers/content.php on line 72"
It is likely that you do not have the problem where you need to fix the tables. (Maybe you do as well) but that error message typically means that Joomla cannot connect find Moodle and the first place to look is the url configuration in Joomla side of Joomla.
Another option is that the servers are not permitting the php file_get_contents command to execute. This has been known to be caused by firewall settings, proxy settings, etc.
Have you seen this post
www.joomdle.com/forum/17-r024-support/17...tart=30&lang=en#2050 k
Can you describe your environment a little to help narrow down the problem.
"Warning: file_get_contents([moodle]/mnet/xmlrpc/server.php) [function.file-get-contents]: failed to open stream: HTTP request failed! in [joomla]/administrator/components/com_joomdle/helpers/content.php on line 72"
It is likely that you do not have the problem where you need to fix the tables. (Maybe you do as well) but that error message typically means that Joomla cannot connect find Moodle and the first place to look is the url configuration in Joomla side of Joomla.
Another option is that the servers are not permitting the php file_get_contents command to execute. This has been known to be caused by firewall settings, proxy settings, etc.
Have you seen this post
www.joomdle.com/forum/17-r024-support/17...tart=30&lang=en#2050 k
Can you describe your environment a little to help narrow down the problem.
Please Log in or Create an account to join the conversation.
13 years 7 months ago
13 years 7 months ago by Julien.
Topic Author
Moodle auth/joomdle not working (DB not updated) #4
Hello Cris,
As I said the tables are fixed now, I finally found the Notifications page.
Yes, I've seen this post, but file_get_contents works fine: I managed to retrieve the HTML content of some local and internet websites, so I guess this is not the problem.
Using a small script you gave on another thread in a new file (test.php), I managed to call a Joomla XMLRPC service (joomdle.getUserInfo).
However, trying to call the moodle system check function with the following code raises the same warning and returns a blank response:
============
[29-Jul-2010 14:00:15] PHP Warning: file_get_contents( localhost.com:8888/moodle/mnet/xmlrpc/server.php k) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: HTTP request failed! in /Applications/MAMP/htdocs/moodle/test.php on line 18
[29-Jul-2010 14:00:15] PHP Stack trace:
[29-Jul-2010 14:00:15] PHP 1. {main}() /Applications/MAMP/htdocs/moodle/test.php:0
[29-Jul-2010 14:00:15] PHP 2. file_get_contents() /Applications/MAMP/htdocs/moodle/test.php:18
============
$request = xmlrpc_encode_request("auth/joomdle/auth.php/system_check", array());
$context = stream_context_create(array('http' => array(
'method' => "POST",
'header' => "Content-Type: text/xml ",
'content' => $request
)));
$response = file_get_contents(" localhost.com:8888/moodle/mnet/xmlrpc/server.php",false k, $context);
echo "Response:<br>";
print_r ($response);
============
Maybe I could try to call another function of Moodle (core) through RPC ? Any hints ?
Thanks for your help !
Edit: The URLs I call in file_get_contents do start with "h t t p : / /", but this is stripped out in the forum.
As I said the tables are fixed now, I finally found the Notifications page.
Yes, I've seen this post, but file_get_contents works fine: I managed to retrieve the HTML content of some local and internet websites, so I guess this is not the problem.
Using a small script you gave on another thread in a new file (test.php), I managed to call a Joomla XMLRPC service (joomdle.getUserInfo).
However, trying to call the moodle system check function with the following code raises the same warning and returns a blank response:
============
[29-Jul-2010 14:00:15] PHP Warning: file_get_contents( localhost.com:8888/moodle/mnet/xmlrpc/server.php k) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: HTTP request failed! in /Applications/MAMP/htdocs/moodle/test.php on line 18
[29-Jul-2010 14:00:15] PHP Stack trace:
[29-Jul-2010 14:00:15] PHP 1. {main}() /Applications/MAMP/htdocs/moodle/test.php:0
[29-Jul-2010 14:00:15] PHP 2. file_get_contents() /Applications/MAMP/htdocs/moodle/test.php:18
============
$request = xmlrpc_encode_request("auth/joomdle/auth.php/system_check", array());
$context = stream_context_create(array('http' => array(
'method' => "POST",
'header' => "Content-Type: text/xml ",
'content' => $request
)));
$response = file_get_contents(" localhost.com:8888/moodle/mnet/xmlrpc/server.php",false k, $context);
echo "Response:<br>";
print_r ($response);
============
Maybe I could try to call another function of Moodle (core) through RPC ? Any hints ?
Thanks for your help !
Edit: The URLs I call in file_get_contents do start with "h t t p : / /", but this is stripped out in the forum.
Please Log in or Create an account to join the conversation.
13 years 7 months ago
Moodle auth/joomdle not working (DB not updated) #5
Can you visit that URL (
localhost.com:8888/moodle/mnet/xmlrpc/server
k) with the browser? What do you get?
Please Log in or Create an account to join the conversation.
13 years 7 months ago
Topic Author
Moodle auth/joomdle not working (DB not updated) #6
I get:
faultCode 713 faultString Unable to locate function, or function prohibited for RPC.
faultCode 713 faultString Unable to locate function, or function prohibited for RPC.
Please Log in or Create an account to join the conversation.
13 years 7 months ago
Moodle auth/joomdle not working (DB not updated) #7
Is that really localhost.com??? That is a very strange config....
The error you get is the expected result, so it seems to be working on the browser.
Sorry, but I just remebered this thread:
www.joomdle.com/en/forum/17-r024-support/1789-install-problems k
MAMP is supplied without XML-RPC compiled in, so I don't think you will be able to make Joomdle run on it, unless you compile MAMP yourself with xml-rpc enabled (don't know if that is even possible).
The error you get is the expected result, so it seems to be working on the browser.
Sorry, but I just remebered this thread:
www.joomdle.com/en/forum/17-r024-support/1789-install-problems k
MAMP is supplied without XML-RPC compiled in, so I don't think you will be able to make Joomdle run on it, unless you compile MAMP yourself with xml-rpc enabled (don't know if that is even possible).
Please Log in or Create an account to join the conversation.
13 years 7 months ago
13 years 7 months ago by Julien.
Topic Author
Moodle auth/joomdle not working (DB not updated) #8
Hi Antonio,
Yes, it is localhost.com, my local hosts file sends it to 127.0.0.1. I use this to fix some cookie-related problems with some other software.
I did install XML-RPC for MAMP (got it already compiled for Mac from the Moodle bundle). I'm assuming it works since I can successfully call Joomla functions with it, and appears as enabled in my phpinfo().
I'm wondering something: apart from the "Networking > XML-RPC Hosts", isn't there some authentication check to be able to call Moodle (or Joomdle) functions with XMLRPC ?
What should be the settings under "Networking > Peers" ?
Yes, it is localhost.com, my local hosts file sends it to 127.0.0.1. I use this to fix some cookie-related problems with some other software.
I did install XML-RPC for MAMP (got it already compiled for Mac from the Moodle bundle). I'm assuming it works since I can successfully call Joomla functions with it, and appears as enabled in my phpinfo().
I'm wondering something: apart from the "Networking > XML-RPC Hosts", isn't there some authentication check to be able to call Moodle (or Joomdle) functions with XMLRPC ?
What should be the settings under "Networking > Peers" ?
Please Log in or Create an account to join the conversation.
13 years 7 months ago
Topic Author
Moodle auth/joomdle not working (DB not updated) #9
I'm seeing Moodle Networking uses certificates, could it be an issue with these settings? Does Joomdle use HTTPS ?
Please Log in or Create an account to join the conversation.
13 years 7 months ago
Moodle auth/joomdle not working (DB not updated) #10
In short, no and no:
- No more config is required: adding IP to host list allows host to use plain xml-rpc, and the install process makes the joomdle functions avaible for all configured hosts
- Joomdle does not user cetificates nor https.
Seeing you already have xmlrpc correctly running, the main issue here is:
PHP Warning: file_get_contents(localhost.com:8888/moodle/mnet/xmlrpc/server.php) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: HTTP request failed! in /Applications/MAMP/htdocs/moodle/test.php on line 18
We need to find out why the call to file_get_contents is failing. To do this try changing the test script to:
- get another localhost.com page, like index.php
$response = file_get_contents("localhost.com:8888/index.php",false, $context);
- get a remote page, like google
$response = file_get_contents("google.com",false, $context);
- No more config is required: adding IP to host list allows host to use plain xml-rpc, and the install process makes the joomdle functions avaible for all configured hosts
- Joomdle does not user cetificates nor https.
Seeing you already have xmlrpc correctly running, the main issue here is:
PHP Warning: file_get_contents(localhost.com:8888/moodle/mnet/xmlrpc/server.php) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: HTTP request failed! in /Applications/MAMP/htdocs/moodle/test.php on line 18
We need to find out why the call to file_get_contents is failing. To do this try changing the test script to:
- get another localhost.com page, like index.php
$response = file_get_contents("localhost.com:8888/index.php",false, $context);
- get a remote page, like google
$response = file_get_contents("google.com",false, $context);
Please Log in or Create an account to join the conversation.