php.net |  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
Votes:4
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: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ts at ambiweb dot de
New email:
PHP Version: OS:

 

 [2010-02-01 23:20 UTC] ts at ambiweb dot de
Description:
------------
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. 


Patches

Pull Requests

History

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] jani@php.net
-Package: Feature/Change Request +Package: Network related
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 02 15:01:30 2024 UTC