Categories

Tuesday, 23 April 2013

php_network_getaddress: getaddrinfo failed.

Hello,

 If you face the error as php_network_getaddress: getaddrinfo failed. on using file_get_contents on php

Then first check if fopen is enabled on php
else enable alloe_url_fopen on php.ini of the server and restart apache

If it is still not fixed, check the resolver configurations
change the name servers to google's one in /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

Then load the code . If still not fixed , then do the following in /etc/hosts.

127.0.0.1 yourdomainname:80
 
Replace  yourdomainname with the server's hostname

This will fix the issue..


Regards
Syamkumar.M

No comments:

Post a Comment

Ad