PHP dns_get_record wrong?
I've run into a very strange issue where PHP's dns_get_record() function is returning old results.
On the same server, if I use host or dig from the command line, I get the correct results.
I've even used dig to query each individual nameserver and all return the correct current value for the record.
The servers are running Ubuntu 16.04 and are up-to-date. I haven't tried a reboot yet because these are production boxes.
This is happening on 2 of my servers, not all of them, so it doesn't sounds like a Linode network thing.
Can anyone think of any reason why this would be?
2 Replies
Has there ever been a hosts file entry for that record?
I believe host + dig query the DNS whereas the PHP function uses the system’s resolver which would check the hosts file first.