|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #50903 dns_get_record sends warnings
Submitted: 2010-02-01 23:20 UTC Modified: 2010-12-03 17:52 UTC
Avg. Score:4.2 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: ts at ambiweb dot de Assigned:
Status: Open Package: Network related
PHP Version: 5.2.12 OS: debian lenny4
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-02-01 23:20 UTC] ts at ambiweb dot de
if you check a non-existing domain you will get:

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

there is no way to validate if the domain does exist before calling dns_get_record().

Expected result:
the function should instead return an empty array. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-11 19:41 UTC] luke dot hoezee at gmail dot com
The way I worked around this was to first check the record using this function: checkdnsrr()

That returns true or false.  If it returns true then I get my results using dns_get_record().

However, I was getting the error you are showing for a domain that actually exists, but it was a parked domain.  It came up with DNS settings for hostgator... So, I'm a little confused on that.

But in any case, that worked for me.
 [2010-12-03 17:53 UTC]
-Package: Feature/Change Request +Package: Network related
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Sun Nov 29 08:02:02 2015 UTC