|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51968 dns_get_record() [function.dns-get-record]: res_nsend() failed
Submitted: 2010-06-01 18:49 UTC Modified: 2013-10-02 05:39 UTC
Avg. Score:4.1 ± 1.0
Reproduced:9 of 9 (100.0%)
Same Version:2 (22.2%)
Same OS:1 (11.1%)
From: php at hm2k dot org Assigned: mike (profile)
Status: Closed Package: *Network Functions
PHP Version: 5.3.2 OS:
Private report: No CVE-ID: None
 [2010-06-01 18:49 UTC] php at hm2k dot org
Certain hosts cause the dns_get_record() to fail with the following error:

Warning: dns_get_record() [function.dns-get-record]: res_nsend() failed in dns.php  on line 3

A live example of this error is found here:

Test script:




Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-06 08:30 UTC]
-Status: Open +Status: Feedback
 [2010-06-06 08:30 UTC]
Please be more specific, which OS does this happen on?
 [2010-06-06 12:32 UTC]
Not Windows. I was testing on CentOS 4 and 5, but based on Google results, I'd say it's more common across many Linux based servers.
 [2010-10-12 13:57 UTC] boyan at peychev dot net

I have this problem too:

Warning: dns_get_record() [function.dns-get-record]: res_nsend() failed in .....

Example problematic domains:

dns_get_record('', DNS_NS);
dns_get_record('', DNS_NS);
dns_get_record('', DNS_NS);
dns_get_record('', DNS_NS);
dns_get_record('', DNS_NS);

PHP Version: 5.2.6-1+lenny9 with Suhosin-Patch (cli) (built: Aug  4 2010 
OS: Debian 5.0.6

Boyan Peychev
 [2011-09-26 10:04 UTC] m dot alsemany at gmail dot com
even if I make an Exception 
this error come !!

the only way to hide is just close the reporting from php.ini :(
 [2011-10-07 11:59 UTC] b1gag3 at hotmail dot de
using error suppression (@dns_get_record('')) works, even it doesn't solve the problem...
 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 [2013-02-18 20:53 UTC]
-Status: No Feedback +Status: Open
 [2013-02-18 20:53 UTC]
What feedback were you expecting?
 [2013-10-02 05:39 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: mike
 [2013-10-02 05:39 UTC]
Fixed since 5.3+
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon May 25 09:01:25 2020 UTC