php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80270 dns_get_record returns duplicates and unexpected output
Submitted: 2020-10-22 14:03 UTC Modified: 2020-11-01 04:22 UTC
From: ctskol09dw001 at gmail dot com Assigned:
Status: No Feedback Package: Network related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ctskol09dw001 at gmail dot com
New email:
PHP Version: OS:

 

 [2020-10-22 14:03 UTC] ctskol09dw001 at gmail dot com
Description:
------------
Issue 1 :- Expected behaviour :- Should return string as value field for TXT 
                                 records 
           Current Behaviour :-   Array returned as value for TXT records 

Issue 2 :- Expected behaviour :- Names of nameservers should be unique and 
                                 should be returning both IPV4 and IPV6 values 
           Current Behaviour :- Names of nameservers repeated several times and 
                                no IPV4 or IPV6 values returned 

Issue 3 :- For Facebook.com dns_get_record () returns the following SOA records multiple times which are not shown by Google Dig tool ( https://toolbox.googleapps.com/apps/dig ) / nslookup on windows :- 

 BODIS.com  IN  984  SOA  ns1.BODIS.com  dnsadmin.BODIS.com  2017062202  10800  3600  1209600  3600  
      

Test script:
---------------
<?php 
 $dns_result =  dns_get_record ( "facebook.com" , DNS_ALL , $authns , $addtnl )  ; 
try { 
foreach ( $dns_result as $dns_result_key => $dns_result_value )
{ $rec = $dns_result_value ; 
foreach ( $rec as $key => $value)
{	echo "$value &nbsp" ; 
}
echo "<br>" ; 
} 
foreach ( $authns as $key_authns => $value_authns )
{	foreach ( $value_authns as $key_value_authns => $value_value_authns )
	{		echo "$value_value_authns &nbsp" ; 
	
	}
echo "<br>" ;
}
} 
 
catch ( Exception $e ) 
{ 
  echo "$e->getMessage()" ; 
}  
?>   



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-22 19:57 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2020-10-22 19:57 UTC] requinix@php.net
> Should return string as value field for TXT records
It does that in the "txt" field.

> Names of nameservers should be unique
They are in the output I'm seeing.

> and should be returning both IPV4 and IPV6 values
If you want addresses for the nameservers then do the DNS lookups for it.

> For Facebook.com dns_get_record () returns the following SOA records
Not for me.
 [2020-11-01 04:22 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 "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 03:01:28 2024 UTC