#43502 [NEW]: Tiny patches for using dns_get_mx()

From: Date: Wed, 05 Dec 2007 09:23:45 +0000
Subject: #43502 [NEW]: Tiny patches for using dns_get_mx()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-120378@lists.php.net to get a copy of this message
From: tsumai at kagoya dot com Operating system: Vine Linux 4.1 PHP version: 5.2.5 PHP Bug Type: Network related Bug description: Tiny patches for using dns_get_mx() Description: ------------ The following message is generated when a PHP file is viewed: (it is run by libphp5.so module for Apache 1.3.37) Fatal error: Call to undefined function getmxrr() in /home/testuser/public_html/test.php on line 2 The content of the file test.php is as follows: <? getmxrr('example.com', $a); echo $a[0]; ?> The following patch works well in my environment: diff -urN php-5.2.5.orig/ext/standard/basic_functions.c php-5.2.5/ext/standard/basic_functions.c --- php-5.2.5.orig/ext/standard/basic_functions.c 2007-10-22 16:37:20.000000000 +0900 +++ php-5.2.5/ext/standard/basic_functions.c 2007-12-05 17:39:35.000000000 +0900 @@ -20,6 +20,11 @@ /* $Id: basic_functions.c,v 1.725.2.31.2.66 2007/10/22 07:37:20 dmitry Exp $ */ #include "php.h" +#ifdef PHP_WIN32 +#include "config.w32.h" +#else +#include <php_config.h> +#endif #include "php_streams.h" #include "php_main.h" #include "php_globals.h" diff -urN php-5.2.5.orig/ext/standard/dns.c php-5.2.5/ext/standard/dns.c --- php-5.2.5.orig/ext/standard/dns.c 2007-06-26 20:04:55.000000000 +0900 +++ php-5.2.5/ext/standard/dns.c 2007-12-05 17:33:10.000000000 +0900 @@ -22,6 +22,11 @@ /* {{{ includes */ #include "php.h" +#ifdef PHP_WIN32 +#include "config.w32.h" +#else +#include <php_config.h> +#endif #if HAVE_SYS_SOCKET_H #include <sys/socket.h> -- Edit bug report at http://bugs.php.net/?id=43502&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43502&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43502&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43502&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43502&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43502&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43502&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43502&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43502&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43502&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43502&r=support Expected behavior: http://bugs.php.net/fix.php?id=43502&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43502&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43502&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43502&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43502&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43502&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43502&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43502&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43502&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43502&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43502&r=mysqlcfg

« previous php.bugs (#120378) next »