php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43502 Tiny patches for using dns_get_mx()
Submitted: 2007-12-05 09:23 UTC Modified: 2007-12-05 10:58 UTC
From: tsumai at kagoya dot com Assigned:
Status: Closed Package: Network related
PHP Version: 5.2.5 OS: Vine Linux 4.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tsumai at kagoya dot com
New email:
PHP Version: OS:

 

 [2007-12-05 09:23 UTC] tsumai at kagoya dot com
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>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-05 10:08 UTC] jani@php.net
That include is already there, why do you think you need it to be included twice? How exactly did you build PHP?
 [2007-12-05 10:58 UTC] tsumai at kagoya dot com
I have entirely built PHP again, and I found that patch is NOT required.
(dns_get_mx() is now available without that patch)
I withdraw this report.  I'm very sorry.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 13:01:33 2025 UTC