× R0.22 and earlier: No Longer Supported

[Solved] file_get_contents error

11 years 8 months ago
agbandini
Topic Author
[Solved] file_get_contents error #21
Unfortunately all is properly configured:

- the xmlrpl plugin is active
- web services in joomla are active
- joomdle auth plugin in moodle is properly configured with the url of my site

:(

My question is: Joomdle provide to define a user in moodle when it is created in joomla. If I go in the moodle user panel and I complete the fields for the user (including password, the same defined in joomla) at this point I would get in?
The topic has been locked.
11 years 8 months ago
Antonio Durán
Posts: 7331
More
[Solved] file_get_contents error #22
No, there is no password for the usar in Moodle. Yo cannot set it. The joomdle auth method requires you to login through joomla.

Did you try to create another user and obtanied the same results?
The topic has been locked.
11 years 8 months ago
agbandini
Topic Author
[Solved] file_get_contents error #23
I obtained the same result..the only change was the quest login.

previously in moodle I disabled the guest access and from joomla I was redirect to the moodle login page. Now with the guest access enabled From joomla I enter in moodle as guest...only this....
The topic has been locked.
11 years 8 months ago
Antonio Durán
Posts: 7331
More
[Solved] file_get_contents error #24
What I asked is if you get a new user in Moodle when creating in Joomla, and if the user's fields are blank.

The only reason possible for that is that Moodle connection to Joomla is not working.
The topic has been locked.
11 years 8 months ago
agbandini
Topic Author
[Solved] file_get_contents error #25
Hi

After a short pause I'm back to the problem :)

I wanted to ask you what kind of test can I do to understand what is in the connection that fail...which files to check..etc
The topic has been locked.
11 years 8 months ago
Antonio Durán
Posts: 7331
More
[Solved] file_get_contents error #26
The test to do is: create a new user in joomla from back-end.
Without logging in with him, go to Moodle admin and see user details.

If they are all blank, then xmlrpc joomla plugin is not working. Possible causes:
- Bad config in Moodle plugin, Plugin not enabled, bad Moodle networking config...
- xml-rpc plugin not active, not installed, registered or special set .. in joomla
- Web services in joomla not working

Any of these has to be.
The topic has been locked.
11 years 8 months ago
agbandini
Topic Author
[Solved] file_get_contents error #27
Hi
I made several tests to understand how to solve the problem.
I verified the setting of xml-rpc in joomla and moodle and they are enabled and configured.
the strange thing is that joomla succeed to create the user in moodle but fails to write data in it...I don't know.

if you want I can enable an administration account for you in joomla and moodle so you can check the situation...
The topic has been locked.
11 years 8 months ago
Antonio Durán
Posts: 7331
More
[Solved] file_get_contents error #28
That is why I think is a joomla problem.
The process is this:
- When creating a new user in joomla, it calls a web service in moodle to create a new user
- This web service, calls a web service in Joomla to get user details. This is what is failing, as the details are empty.

So, I would write a simple test to confirm. Create a new file test.php in document webroot with this, modifyng your username and URL.

<?php
$username='YOURUSERNAME';
$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("http://YOUR_URL/xmlrpc/index.php", false, $context);

echo "Response:<br>";
print_r ($response);

?>

Go to the file's url and see what you get. This just calls the web service to get the user details.
The topic has been locked.
11 years 8 months ago
agbandini
Topic Author
[Solved] file_get_contents error #29
Hi,

Once again, thanks to your invaluable help, we solved the problem!! :laugh:

with whe test you have suggert me we realized that looked like a names resolution latency issue or even worse, was resolved with the internal IP and then the XML-RPC was fault.

we modified once agin the file hosts on the server and now it works perfectly :)

Thank you for your help!!!!
Grazie!

bye
The topic has been locked.