Bug #53025 [Opn->Fbk]: checkdnsrr() result vary for specific server
| From: | pajoye@php.net | Date: | Sun, 10 Oct 2010 12:45:49 +0000 |
| Subject: | Bug #53025 [Opn->Fbk]: checkdnsrr() result vary for specific server | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-155056@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
Updated by: pajoye@php.net
Reported by: uni at daniel-marschall dot de
Summary: checkdnsrr() result vary for specific server
-Status: Open
+Status: Feedback
Type: Bug
Package: Unknown/Other Function
Operating System: Various
PHP Version: Irrelevant
Block user comment: N
New Comment:
I asked which OS and which versions of these OSes do you use. Please
answer.
Previous Comments:
------------------------------------------------------------------------
[2010-10-10 06:50:44] uni at daniel-marschall dot de
Hello.
I DO think that it is a bug in PHP.
To your question, which OS I am using, please look in my initial comment
again.
I ran this testscript with wrong results on Windows AND Linux.
It is not possible that my DNS/ISP is fault since I got also a Java
application
which checks A-records and there "us.ibm.com" has no A-records. But the
PHP
script says, A-records are available.
------------------------------------------------------------------------
[2010-10-09 01:50:43] pajoye@php.net
Which operating system are you using exactly? Windows (which version?)
Or linux?
Windows has a different DNS implementation than unix.
Also different results may be due to the use of different DNS servers.
Be sure to check that every client uses the same.
On windows you don't have to install PHP to test a new version but
simply uncompress the zip somewhere and run:
php -n dns.php
from the php directory.
------------------------------------------------------------------------
[2010-10-09 00:46:39] uni at daniel-marschall dot de
I have tried it now with PHP 5.3.3 at my Windows XP machine. Same
result. A-record
found. I expect that no A-record for this hostname is found.
Alas, I cannot change the PHP versions for the 2 webservers.
------------------------------------------------------------------------
[2010-10-08 17:20:18] dominic at sayers dot cc
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?
------------------------------------------------------------------------
[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