php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27665 checkdnsrr and getmxrr don't like zero preferenfence MX RR's
Submitted: 2004-03-23 17:32 UTC Modified: 2004-03-23 17:49 UTC
From: php-bugs at mcooper dot demon dot co dot uk Assigned:
Status: Not a bug Package: Network related
PHP Version: 4.3.4 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php-bugs at mcooper dot demon dot co dot uk
New email:
PHP Version: OS:

 

 [2004-03-23 17:32 UTC] php-bugs at mcooper dot demon dot co dot uk
Description:
------------
The checkdnsrr and getmxrr functions don't work with domain's that only have a single zero preference MX record.

Reproduce code:
---------------
    $Domain = "gostoni.net";
    echo $Domain;
    // That MX(mail exchanger) record exists in domain check .
    // checkdnsrr function reference : http://www.php.net/manual/en/function.checkdnsrr.php
    if ( checkdnsrr ( $Domain, "MX" ) )  {
        echo "Confirmation : MX record about {$Domain} exists.<br>";
        // If MX record exists, save MX record address.
        // getmxrr function reference : http://www.php.net/manual/en/function.getmxrr.php
        if ( getmxrr ($Domain, $MXHost))  {
                echo "Confirmation : Is confirming address by MX LOOKUP.<br>";



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-23 17:49 UTC] pollita@php.net
The domain you provided in your example is not registered (or if it is, it was only done recently and hasn't propagated to name servers yet, either way it's not resolvable by name name service, not just PHP).

Testing these functions with actual hostnames that contain MXs with preference of 0 returns expected results.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 09 03:01:32 2024 UTC