Drupal: Status report problem: HTTP request status fails

Some of you may have encountered this problem in some cases. In "Status Report" page, accidentally appears the error below:

HTTP request status   Fails
Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality. This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services.

What I did, was to recheck that my webserver had access to internet. Of course it had! The problem exists mostly when there is no information to resolve the domain name used with the local ip address of the webserver. This means that an error occurs in the entries of the DNS server.

In cases where DNS server is not existant(ex. local testing environment) all you have to do is inform the /etc/hosts file. For example if you use the domain http://www.example.local/ and your local ip address is 192.168.1.2 then all you have to do is create/edit a entry like this in /etc/hosts:

#/etc/hosts file
127.0.0.1 example
192.168.1.2 example.local www.example.local

or if you have multiple domains assigned to the same computer use the example below:
#/etc/hosts file
127.0.0.1 example
192.168.1.2 domain1.local www.domain1.local domain2.local www.domain2.local example.local www.example.local

PS: This problem is discussed in drupal.org.

Comments

Popular Posts