Unable to fetch but drupal_http_request works fine
leobaby - February 22, 2008 - 06:04
| Project: | Update Status |
| Version: | 5.x-2.2 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
"Unable to fetch any information on available new releases and updates."
But if I do a
<?php
$result = drupal_http_request('http://www.google.com');
print_r($result);
?>It seems to work inserting google into my node.
Any suggestions how to solve this problem?

#1
This module works for 1000s of other people, so I doubt it's a bug, but without more information about your configuration, I can't say for sure.
#2
Ok, I installed a blank drupal 6 next to my current 5.7 install and it reports HTTP request status Fails. The fact remains that the php code above works, so ...
So I try changing the google.com in the request above to drupal.org and guess what..
stdClass Object ( [error] => 101 Network is unreachable [code] => -101 )
Is my host blocking drupal?
#3
And there you have it....
The host is AnHosting (part of MidPhase hosting); and their response is...
"Sorry, but we do not allow to load files from another servers thought PHP-scripts because of security reason. That is why your Drupal shows that error."
But drupal_http_request works for sites like eclipse.org, sf.net, google.com; but not drupal.org. This doesn't sit well with me, especially since I prepaid for the year and they changed it halfway through.
EDIT: I've now tried a number of sites from different continents and ONLY drupal.org is blocked. Grrrr.
#4
Is there a php or apache config to allow such requests?
I can't get any site to be connectable via http request.
#5
your host may permit you to edit your php.ini file to do this - but they will warn against it as it will open and expose all sites on your server (shared web hosting) and so it presents new issues...
article about some of this at:
http://www.ziguras.com/php/using-fsockopen-to-connect-to-remote-servers
i'm going through the same exact thing right now...sucks. can't use openID, aggregator, update status module etc..
#6
I'm also with AN Hosting and was suffering the same symptoms: "Unable to fetch any information on available new releases and updates." I pointed this thread to AN support who's response was to confirm that drupal.com was being blocked by their firewall. They unblocked it and all seems fine now.
#7
Looks like this was resolved.