× R0.22 and earlier: No Longer Supported

[Solved] file_get_contents error

11 years 8 months ago 11 years 8 months ago by Antonio Durán.
agbandini
Topic Author
[Solved] file_get_contents error #1
Hi,

I've installed joomdle and I've configured moodle as explained in your guide.
Now the problem is tha in modules and components I obtain these errors:

component
Warning: file_get_contents( fad.creasviluppopz.it/mnet/xmlrpc/server.php k) [function.file-get-contents]: failed to open stream: Connection refused in /var/www/html/creasviluppopz/sito/components/com_joomdle/helpers/content.php on line 44

module my courses
Warning: file_get_contents( fad.creasviluppopz.it/mnet/xmlrpc/server.php k) [function.file-get-contents]: failed to open stream: Connection refused in /var/www/html/creasviluppopz/sito/modules/mod_joomdle_my_courses/mod_joomdle_my_courses.php on line 49

the urls on my server are:

joomla: www.creasviluppopz.it k
moodle: fad.creasviluppopz.it

the platforms are on the same server...please can you help me to solve these problems?

thank you
The topic has been locked.
11 years 8 months ago
Antonio Durán
Posts: 7331
More
[Solved] file_get_contents error #2
Hi. I don't know what the problem is.
The URL is accesible just fine from the outside, so I think it must be a local issue.
I see that both domains share the same IP. Maybe this has something to do?

The problem seems to be that one domain is not accesible from the other one :(
The topic has been locked.
11 years 8 months ago
agbandini
Topic Author
[Solved] file_get_contents error #3
Hi,

I have only one doubt, this error can result from the XML-RPC host configuration?
I did not understand if is necessary to insert the public ip of the server or the private ip.....
The topic has been locked.
11 years 8 months ago
Antonio Durán
Posts: 7331
More
[Solved] file_get_contents error #4
I don't think is has to do with xml-rpc, as the error is prior to that.
For XML-RPC, an http connection is made using file_get_contents. That is what is failing.

If you try to go to the url with your browser ( fad.creasviluppopz.it/mnet/xmlrpc/server.php k) you will get a XML-RPC error, but the connection is working.

So, as I said, what is not working is connecting from one site to the other. Don't know if it can be a DNS issue or something else...

An easy test would be to create a file like this on www.creasviluppopz.it k:
<?
echo "File: ".file_get_contents ("http ://fad.creasviluppopz.it/");
?>

Remove the space after http, I put it so the forum does not scramble it.
The topic has been locked.
11 years 8 months ago
agbandini
Topic Author
[Solved] file_get_contents error #5
Hi,

I've created the test files in www.creasviluppopz.it k (this domain is in the same server of moodle) and I've obtained an error, connection refused.

I've tried to create the file under another server of my network and it workred.

Now the situation is that if joomla and moodle runs under the same server (ip) joomdle does not work..is possible???
The topic has been locked.
11 years 8 months ago
Antonio Durán
Posts: 7331
More
[Solved] file_get_contents error #6
No, I think think that is the issue has nothing to do with Joomlde.

As showed by your test, what is not working is connecting, Joomdle just happen to use connections :)

I mean, if you had a browser in your joomla server, you would not be able to load your moodle site.

I would contact my hosting provider with this info to know if they can help.
The topic has been locked.
11 years 8 months ago
agbandini
Topic Author
[Solved] file_get_contents error #7
Hi,

I've solved the problem:

the function fgets went in timeout for the configuration of the DNS names.
I've simply insered the url fad.creasviluppopz.it in the hosts file and it worked!!!
:D

Now..continuing to configure the patforms I've founded another problem:

I've created a user (administrator) in joomla and I tryed to login from the site frontend to moodle. the login in moodle not worked properly infact I was redirect to the moodle login page. I tryed to enter manually but I obtained the wrong login error message....have I done something wrong????
The topic has been locked.
11 years 8 months ago
Antonio Durán
Posts: 7331
More
[Solved] file_get_contents error #8
Hi. Great that you solved the problem.

Joomdle is not meant to manage admin accounts. To test, create a normal user account an then log in in front-end with it.
The topic has been locked.
11 years 8 months ago
agbandini
Topic Author
[Solved] file_get_contents error #9
Hi,

I've created a normal user (registered) in joomla but the result was the same...moodle refused the users that uses joomdle as autentication method..why???
The topic has been locked.
11 years 8 months ago
Antonio Durán
Posts: 7331
More
[Solved] file_get_contents error #10
What are you trying?
Joomdle users cannot login to Moodle directly.
They log in Jomlla and are automatically logged in Moodle, if the joomdlehooks plugin is enabled and configured.
The topic has been locked.