Bug #80270 [NEW]: dns_get_record returns duplicates and unexpected output

From: Date: Thu, 22 Oct 2020 14:03:37 +0000
Subject: Bug #80270 [NEW]: dns_get_record returns duplicates and unexpected output
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229854@lists.php.net to get a copy of this message
From: ctskol09dw001 at gmail dot com Operating system: Linux PHP version: Irrelevant Package: Network related Bug Type: Bug Bug description:dns_get_record returns duplicates and unexpected output 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()" ; } ?> -- Edit bug report at https://bugs.php.net/bug.php?id=80270&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80270&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80270&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80270&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80270&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80270&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80270&r=support Expected behavior: https://bugs.php.net/fix.php?id=80270&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80270&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80270&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80270&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80270&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80270&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80270&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80270&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80270&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80270&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80270&r=mysqlcfg

« previous php.bugs (#229854) next »