|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-07-24 16:36 UTC] 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 20:00:02 2025 UTC |
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" }Doesn't work here (FC 4 machine), but checkdnsrr does: sam@snoopy:~> php -r 'var_dump(getmxrr("yahoo.com", $var)); var_dump($var);' sam@snoopy:~> sam@snoopy:~> php -r 'var_dump(checkdnsrr("yahoo.com"));' bool(true) sam@snoopy:~> 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): sam@lassie:~> 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" } sam@lassie:~> uname -a Linux lassie 2.6.17-1.2157_FC5 #1 Tue Jul 11 22:55:46 EDT 2006 i686 athlon i386 GNU/Linux sam@lassie:~>