- Posts: 3
Joomdle Web Services Error - Possible Proxy Issue
- James Marshall
- Topic Author
- Offline
- New Member
-
Less
More
14 years 2 months ago #1
by James Marshall
Joomdle Web Services Error - Possible Proxy Issue was created by James Marshall
Hello.
I was wondering if anyone had any advice with setting up Joomdle behind a proxy. We have an internal server (running Windows Server 2003) that serves both Moodle (1.9.12) and a Joomla (2.5.1) installation using PHP 5.3.3 and MySQL 5.1.5. I am trying to get Joomdle setup but I can't seem to make either of the installations talk to each other.
I have run the System Check in Joomdle R07 and everything is green apart from Joomdle Web Services which failed. I have the correct address for our Moodle installation ( portal.landau-forte.org.uk/vle/ ) and I have tried both file_get_contents and cURL but neither work.
Separately, I setup a test file_get_contents page that tries to return the internal address of our College wide home page (http://portal/). I get the following error which leads me to believe it could be a proxy server issue:
PHP:
<?php
$data = file_get_contents('http://portal', false, $context);
echo $data;
?>
I also tried forcing the script through our proxy server:
PHP:
<?php
$opts = array('http' => array('proxy' => 'tcp://192.168.0.39:8080', 'request_fulluri' => true));
$context = stream_context_create($opts);
$data = file_get_contents('http://portal', false, $context);
echo $data;
?>
Do you have any advice on how to get around this or do you need any more information?
Many thanks,
James
I was wondering if anyone had any advice with setting up Joomdle behind a proxy. We have an internal server (running Windows Server 2003) that serves both Moodle (1.9.12) and a Joomla (2.5.1) installation using PHP 5.3.3 and MySQL 5.1.5. I am trying to get Joomdle setup but I can't seem to make either of the installations talk to each other.
I have run the System Check in Joomdle R07 and everything is green apart from Joomdle Web Services which failed. I have the correct address for our Moodle installation ( portal.landau-forte.org.uk/vle/ ) and I have tried both file_get_contents and cURL but neither work.
Separately, I setup a test file_get_contents page that tries to return the internal address of our College wide home page (http://portal/). I get the following error which leads me to believe it could be a proxy server issue:
PHP:
<?php
$data = file_get_contents('http://portal', false, $context);
echo $data;
?>
Warning: file_get_contents(http://portal) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized in F:\Inetpub\wwwroot\portal2\test.php on line 3
I also tried forcing the script through our proxy server:
PHP:
<?php
$opts = array('http' => array('proxy' => 'tcp://192.168.0.39:8080', 'request_fulluri' => true));
$context = stream_context_create($opts);
$data = file_get_contents('http://portal', false, $context);
echo $data;
?>
Warning: file_get_contents(http://portal) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 407 Proxy Authentication Required in F:\Inetpub\wwwroot\portal2\test.php on line 4
Do you have any advice on how to get around this or do you need any more information?
Many thanks,
James
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7848
14 years 2 months ago #2
by Antonio Durán
Replied by Antonio Durán on topic Re: Joomdle Web Services Error - Possible Proxy Issue
You should contact your system admin, so he give you access:
> HTTP request failed! HTTP/1.1 401 Unauthorized
> HTTP request failed! HTTP/1.1 401 Unauthorized
Please Log in or Create an account to join the conversation.
- James Marshall
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
14 years 2 months ago #3
by James Marshall
Replied by James Marshall on topic Re: Joomdle Web Services Error - Possible Proxy Issue
Hi Antonio
Thanks for your reply. I have had our system admin give me unrestricted access so nothing is blocked. The proxy server IP is the same but I connect using a different port. This unrestricted access is linked to the IP address of the Moodle/Joomla server.
I have tried both cURL and file_get_contents again, but to no avail.
I don't understand what's wrong. I am now not being filtered at all and I am still receiving these errors. Is it right that the unrestricted accesss should be applied to the Moodle/Joomla server? Any PHP scripts run (via users accessing the server) should take the filtering based on the LAN settings in the Connections tab of Windows' Internet Options dialog box, right?
Thanks,
James
Thanks for your reply. I have had our system admin give me unrestricted access so nothing is blocked. The proxy server IP is the same but I connect using a different port. This unrestricted access is linked to the IP address of the Moodle/Joomla server.
I have tried both cURL and file_get_contents again, but to no avail.
I don't understand what's wrong. I am now not being filtered at all and I am still receiving these errors. Is it right that the unrestricted accesss should be applied to the Moodle/Joomla server? Any PHP scripts run (via users accessing the server) should take the filtering based on the LAN settings in the Connections tab of Windows' Internet Options dialog box, right?
Thanks,
James
Please Log in or Create an account to join the conversation.
- James Marshall
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
14 years 2 months ago #4
by James Marshall
Replied by James Marshall on topic Re: Joomdle Web Services Error - Possible Proxy Issue
Hello Antonio
So it seems there is no global way to set the proxy details for PHP which means Joomdle will have problems communicating with our setup.
I have setup a test page for cURL and this time passed in some proxy details. I can return the data of any external website (Google, BBC, our own site, etc), however I still run into authentication issues when trying to access our local site ( portal.landau-forte.org.uk/ ).
Do you have any plans to incorporate proxy authentication into Joomdle? Might be a useful addition if other schools/colleges/universities are in our situation.
Cheers,
James
So it seems there is no global way to set the proxy details for PHP which means Joomdle will have problems communicating with our setup.
I have setup a test page for cURL and this time passed in some proxy details. I can return the data of any external website (Google, BBC, our own site, etc), however I still run into authentication issues when trying to access our local site ( portal.landau-forte.org.uk/ ).
Do you have any plans to incorporate proxy authentication into Joomdle? Might be a useful addition if other schools/colleges/universities are in our situation.
Cheers,
James
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7848
14 years 2 months ago #5
by Antonio Durán
Replied by Antonio Durán on topic Re: Joomdle Web Services Error - Possible Proxy Issue
Hi.
We have not thought of proxy support, as this is the first time it comes up.
But, from what you say, it does not seem you need it.
You say both Joomla and Moodle are on the same server, so it would make no sense to go to an external proxy to talk to each other.
I guess this is why you can't get your test script to fecth your local site.
Also, at first Ithought it was a restriction issue, because you did not mention that you had authentication set.
It seems that is simple http auth, that you may have in place while you are developing or soemthing?
I mean, I went to portal.landau-forte.org.uk/ and got a login prompt. While this is on, Joomdle cannot work, as it will get that when trying to connect one to each other.
We have not thought of proxy support, as this is the first time it comes up.
But, from what you say, it does not seem you need it.
You say both Joomla and Moodle are on the same server, so it would make no sense to go to an external proxy to talk to each other.
I guess this is why you can't get your test script to fecth your local site.
Also, at first Ithought it was a restriction issue, because you did not mention that you had authentication set.
It seems that is simple http auth, that you may have in place while you are developing or soemthing?
I mean, I went to portal.landau-forte.org.uk/ and got a login prompt. While this is on, Joomdle cannot work, as it will get that when trying to connect one to each other.
Please Log in or Create an account to join the conversation.