Bug #53025 [Com]: checkdnsrr() result vary for specific server
| From: | dominic at sayers dot cc | Date: | Fri, 08 Oct 2010 15:20:19 +0000 |
| Subject: | Bug #53025 [Com]: checkdnsrr() result vary for specific server | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-155025@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53025&edit=1
ID: 53025
Comment by: dominic at sayers dot cc
Reported by: uni at daniel-marschall dot de
Summary: checkdnsrr() result vary for specific server
Status: Open
Type: Bug
Package: Unknown/Other Function
Operating System: Various
PHP Version: Irrelevant
Block user comment: N
New Comment:
Daniel - check http://bugs.php.net/bug.php?id=51844
I see you're using a mixture of PHP 5.2 and 5.3 - is this a new bug in
5.3
perhaps?
Previous Comments:
------------------------------------------------------------------------
[2010-10-08 16:20:39] uni at daniel-marschall dot de
Description:
------------
I am trying to find out if a webserver has A-records or not. I found out
that for the server "us.ibm.com" the results vary from client to client.
Since I am writing an OpenSource application, I wish that the results of
checkdnsrr() are consistent. I am not sure if it is a bug in PHP.
Test script:
---------------
<?php
$phpver = phpversion();
echo "PHP version: $phpver<br>\r\n";
echo $_SERVER["SERVER_SIGNATURE"] . "<br>\r\n";
$server = 'us.ibm.com';
if (checkdnsrr($server, 'A')) {
echo "$server A-record: VALID";
} else {
echo "$server A-record: NOT VALID";
}
?>
Expected result:
----------------
I do not know which result is correct. I checked the A-record at many
different webservices and each webservice has different results.
Example:
* MX Toolbox: http://mxtoolbox.com/SuperTool.aspx?action=a%3aus.ibm.com
(NO A-RECORD)
* My-Addr.com:
http://my-addr.com/domain-hostname-dns-records/isp-country-geo-ip-location/online-nslookup-tool/domain_info.php?domain=us.ibm.com&x=0&y=0
(A-RECORDS e32.co.us.ibm.com FOUND, but therefore no IP, so data MAY be
incorrect)
* OpenDNS also outputs some A-records for that domain, but I am not sure
if they are valid
* ntchosting.com:
http://www.ntchosting.com/dns/host.html#Check_the_A_record
- Various
A-record FOUND! (e.g. e1.ny.us.ibm.com )
Actual result:
--------------
Some PHP clients output "A record found", others output "No A record
found". I do not know if it is controlled by the OS, the network or the
PHP version.
Examples for data I collected:
1. Tested at my Debian server (viathinksoft.de) and A-record FOUND.
Software: Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.2.6-1+lenny8 with
Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g mod_perl/2.0.4 Perl/v5.10.0
2. Tested at my XAMPP localhost with Windows XP Home and A-record FOUND.
Software: Windows XP Home; XAMPP; Apache/2.2.14 (Win32) DAV/2
mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1
mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1
3. Tested at my university's server (jonathan.sv.hs-mannheim.de) and
A-record NOT found. Software: Apache/2.2.8 (Fedora). PHP version:
5.2.6.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53025&edit=1