tags:

views:

353

answers:

2

Hi, I got the following error when i get containts from file("http://www.otherdomain.com").

file() [function.file]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

The domain server is linux. How to resolve this problem. Please help me.

Thanks,

A: 

make sure that website can be reached from you server. also make sure that you are using has a proper DNS server setup.

if you are sure that website is working ... try modifying the /etc/hosts file and add the website's IP for test purposes, then try to figure out why it doesn't solve the domain.

Mihai Iorga
yes, website is running properly. since last 4-5 days its given this warning : file() [function.file]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in %url% on line %lineno%I did not find hosts file in etc in server. Please tell me how to create that
Sachin
A: 

The Domain can not be resolved to it's IP address.

If you have your DNS running local, try restarting it. If not, check your DNS or add a different server to /etc/resolve.conf (i.e. nameserver 8.8.8.8).

You can also add the domain as a static entry in your hosts file:

On your linux server add the DNS information to your /etc/hosts file using:

echo '127.0.0.1 www.otherdomain.com' >> /etc/hosts

…where 127.0.0.1 is the IP address of your website and www.otherdomain.com the domain name your using.

You can find the IP address of any domain using nslookup, i.e

nslookup www.otherdomain.com

favo
Thank You,my website is running properly. The problem is that emails are not going from my website and when i use file("http://otherdomain.com") it gives an error file() [function.file]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolutionAnd when I use file("http://otherdomainIP.com") if works fine.Please help me to find out this.Thanks,
Sachin