ID:               38195
 User updated by:  sam at ims dot net
 Reported By:      sam at ims dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         *Network Functions
 Operating System: Fedora Core 4
 PHP Version:      5.1.4
 New Comment:

Doesn't work here (FC 4 machine), but checkdnsrr does:

[EMAIL PROTECTED]:~> php -r 'var_dump(getmxrr("yahoo.com", $var));
var_dump($var);'
[EMAIL PROTECTED]:~>
[EMAIL PROTECTED]:~> php -r 'var_dump(checkdnsrr("yahoo.com"));'
bool(true)
[EMAIL PROTECTED]:~> uname -a
Linux snoopy 2.6.15-1.1830_FC4smp #1 SMP Thu Feb 2 17:39:38 EST 2006
i686 i686 i386 GNU/Linux
s

All works here (FC 5 machine):

[EMAIL PROTECTED]:~> php -r 'var_dump(getmxrr("yahoo.com", $var));
var_dump($var);'
bool(true)
array(4) {
  [0]=>
  string(18) "mx2.mail.yahoo.com"
  [1]=>
  string(18) "mx3.mail.yahoo.com"
  [2]=>
  string(18) "mx4.mail.yahoo.com"
  [3]=>
  string(18) "mx1.mail.yahoo.com"
}
[EMAIL PROTECTED]:~> uname -a
Linux lassie 2.6.17-1.2157_FC5 #1 Tue Jul 11 22:55:46 EDT 2006 i686
athlon i386 GNU/Linux
[EMAIL PROTECTED]:~>


Previous Comments:
------------------------------------------------------------------------

[2006-07-24 17:02:35] [EMAIL PROTECTED]

Works perfectly fine here:

# php -r 'var_dump(getmxrr("yahoo.com", $var)); var_dump($var);'
bool(true)
array(4) {
  [0]=>
  string(18) "mx3.mail.yahoo.com"
  [1]=>
  string(18) "mx4.mail.yahoo.com"
  [2]=>
  string(18) "mx1.mail.yahoo.com"
  [3]=>
  string(18) "mx2.mail.yahoo.com"
}


------------------------------------------------------------------------

[2006-07-24 16:36:30] sam at ims dot net

Description:
------------
After upgrading from PHP 4.4.1 to PHP 5.1.4, the getmxrr function
ceased to work.  It does not throw an error message, but simply
terminates the HTTP response at the call.  I've switched to checkdnsrr,
which works fine, and is probably a more appropriate call, but since
getmxrr is still in the documentation for version 5, this appears to be
a bug.

Reproduce code:
---------------
if (getmxrr($host, $email)) return TRUE;

Expected result:
----------------
TRUE returned if $email corresponds to a domain with an MX record;
FALSE otherwise.

Actual result:
--------------
Termination of HTTP response.  Neither TRUE nor FALSE returned. 
Nothing appears in the Apache error log.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38195&edit=1

Reply via email to