|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2016-11-25 01:53 UTC] weirdan at gmail dot com
[2016-12-02 13:05 UTC] weirdan at gmail dot com
[2016-12-18 19:55 UTC] ab@php.net
[2016-12-18 19:55 UTC] ab@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ After upgrading from PHP 5.6.27 to 7.1.0RC6 dns_get_record stopped returning additional records in its out parameter. I've confirmed with tcpdump that PHP (libresolv I imagine) sends the same request as before, and gets the same answer (with additional records), yet $additional array in the following code is no longer populated. Test script: --------------- The actual code I'm trying to get working is: <?php $auth = []; $additional = []; var_dump(dns_get_record("_mysql._slave.service.consul", DNS_SRV, $auth, $additional), $auth, $additional); ?> However it depends on consul service discovery. Simpler reproduce script would be: <?php $auth = []; $additional = []; var_dump(count(dns_get_record("php.net", DNS_ANY, $auth, $additional)), count($auth), count($additional)); ?> Yet it requires known DNS server that returns additional records to be configured as your preferred recursor in /etc/resolv.conf (I used PHP.net's authoritative DNS server below): nameserver 162.159.24.53 Expected result: ---------------- With php.net script above, with resolv.conf configured as described there, running on PHP 5.6.27 I get: int(9) int(0) int(8) <--- $additional is NOT empty Actual result: -------------- Running on PHP 7.1.RC6 (otherwise configured the same) I get: int(9) int(0) int(0) <--- $additional IS empty