Temporary failure in name resolution - fsockopen()
| From: | David Lidstone | Date: | Thu, 25 Mar 2010 10:21:54 +0000 |
| Subject: | Temporary failure in name resolution - fsockopen() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-303433@lists.php.net to get a copy of this message | ||
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?