Re: Temporary failure in name resolution - fsockopen()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/25/2010 03:51 PM, David Lidstone wrote:
We recently para-virtualised a Xen / CentOS box which is running script
which uses fsockopen() to get a connection to an SMTP server.

Since the server changes it fails approx 50% of the time with:

"php_network_getaddresses: getaddrinfo failed: Temporary failure in name
resolution"

We've tried the solutions from Googling this error (such as restarting
Apache etc), but without success.

Why am I wasting your time with a Linux upgrade issue? Well,
gethostbyname() seems to resolve the IP every time. Manual lookups on
from the server seem to work with no problems.

Any help greatly appreciated. Should I perhaps be pointing this out on
the 'internals' list?


I feel its something do with your DNS settings and/or the server.

If that's not the problem then just as a temp solution add your SMTP server's address provided it has a static IP (99.9% it has) to your /etc/hosts file.

It should not give trouble then.

--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux