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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Thu Mar 28 21:01:27 2024 UTC