Received empty response from Moodle

More
13 years 11 months ago - 13 years 11 months ago #1 by Nick
Hi,
I'm using Moodle 2.2.2 and Joomla 2.5.4 with Joomdle 0.81.
I'm getting this error when running System Check: Received empty response from Moodle

I have now checked several times that all values have been entered correctly in Joomdle config and that settings in Moodle are properly done. Still cannot get this to work... I wonder what could have gone wrong. I have noticed though that in MNet Authentication the following is empty:
These host's users can roam in to your site:
Your users can roam out to these hosts:

I have added my site's IP to the trusted XML-RPC hosts and it validated ok.
Any ideas?
Many thanks in advance.
Cheers
Nick
Last edit: 13 years 11 months ago by Nick.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic Re: Received empty response from Moodle
Hi.

Most likely it is the firewall that is preventing the server from connecting to itself.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #3 by Nick
Replied by Nick on topic Re: Received empty response from Moodle
Hi Antonio and thanks for your reply. I'm running the site on a Plesk panel and it seems I won't be able to disable the firewall. Is there some kind of a workaround, perhaps a rule I can add to the firewall..?
I would really like to be able to use moodle and this is important to me.
I have also put in another post related to logging out when joomdlehooks plugin is enabled - it logs me out to moodle rather than to my default Joomla page. Here's the link to the post and I would be grateful if you could give me some advice.
www.joomdle.com/en/forum/r08-support/829...-redirects-to-moodle

Many thanks in advance.
Cheers
Nick

PS. Bridgingg Moodle and Joomla is a very important project. I'm of an opinion that you would be safe to commercialise your component. I'm sure serious users wouldn't mind paying a bit, thus enabling you guys to devote even more time and resources to the further development of Joomdle.
I certainly wish you all the best and thank you for your help.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #4 by Antonio Durán
Replied by Antonio Durán on topic Re: Received empty response from Moodle
Hi there.

You will need to contact your hosting provider, to know what you need to do to allow the server to connect to itself for web services. I cannot give you any indication, as this depends on the server.

As for going commercial: when we started Joomdle we felt it should be GPL and free to download, as Joomla and Moodle are. Also, we have been using free software all our lives, so it's our way to contribute back to the community.
We hope people who like/use Joomdle can donate, hire us or contribute in any other way.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago - 13 years 10 months ago #5 by Phil
Replied by Phil on topic Re: Received empty response from Moodle
Hi Antonio, I have a similar issue...

I have set up both Joomla 1.5 and Moodle 1.9.18 as per the instructions provided in the docs.

Moodle is installed ina directory under the joomla domain. e.g. joomla.com/moodle

When running the health check everything passes ok, but then I get the "Received empty response from Moodle" error.

I have contacted my hosting company as you suggest above and they replied with:

As per your reported issue I check for your local system IP address into the server and the IP address is not blocked, It will be appreciated to assist you in better way if you can elaborate me with all the clear information & the exact steps you are following for getting the observation with error message.

I'm just wondering if that is a sufficient check? Do I need to ask them to do anything specifically?

Thanks,

Phil
Last edit: 13 years 10 months ago by Phil.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #6 by Antonio Durán
Replied by Antonio Durán on topic Re: Received empty response from Moodle
Yo see if there is a connection issue, you can try to open your site from your site.
Create a php file with this contents (modify as needed) and place it in Joomla folder:
Code:
<?php echo file_get_contents ('http://site.com/moodle_folder'); ?>

You should see the Moodle hme page.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #7 by Phil
Replied by Phil on topic Re: Received empty response from Moodle
Hi Antonio, thank you for time,

I have added the php file to www.environmental-academy.com/test.php

Joomla: www.environmental-academy.com
Moodle: www.environmental-academy.com/online

contents of test.php:
Code:
<?php echo file_get_contents ('http://www.environmental-academy.com/online'); ?>

The Moodle page does not come up. What does that suggest?

Many thanks,

Phil

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #8 by Antonio Durán
Replied by Antonio Durán on topic Re: Received empty response from Moodle
It means the server cannot connect to itslef, for whatever reason (firewall, DNS issues...)
If you put the same script in another server, it will work right, so you can use that to get support to look into it.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #9 by Phil
Replied by Phil on topic Re: Received empty response from Moodle
:) Thank you very much Antonio, I will get in touch with my server support team.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #10 by Phil
Replied by Phil on topic Re: Received empty response from Moodle
Hi Antonio,

After working witht he support team for my server they have come back with:

I have checked your issue and found that you were getting the problem because the option "allow_url_fopen" in Global php.ini file was disabled. I have now created a custom php.ini file for your account and enabled the option "allow_url_fopen" in the same.

I have tried the test php file again and it works correctly, forwarding to the moodle site.

However, when I open the health check in Joomla I still get "Received empty response from Moodle".

Any suggestions on what I should check next?

Thanks,

Phil

Please Log in or Create an account to join the conversation.