php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #29337 dns_get_record() unavailable on *BSD
Submitted: 2004-07-22 19:30 UTC Modified: 2012-03-04 17:33 UTC
Votes:37
Avg. Score:4.6 ± 0.9
Reproduced:27 of 28 (96.4%)
Same Version:17 (63.0%)
Same OS:23 (85.2%)
From: php at to-the-max dot net Assigned: rasmus (profile)
Status: Closed Package: Network related
PHP Version: 5.0.0 OS: FreeBSD
Private report: No CVE-ID: None
 [2004-07-22 19:30 UTC] php at to-the-max dot net
Description:
------------
dns_get_record() is not available when PHP is compiled under BSD.

/ext/standard/dns.c uses the res_nmkquery() and res_nsearch() functions present in newer versions of BIND's libresolv.

However those functions are not present on *BSD (and probably other) systems.

Please consider using the older res_mkquery(), res_search() fuctions, to maximize compatibility.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-02 11:08 UTC] derick@php.net
Assigning to the person who last touched this.
 [2008-04-18 12:00 UTC] manuel at mausz dot at
I ran into the same problem yesterday. So I decided to modify the source to fallback to the deprecated ns_mkquery/ns_send if the newer functions aren't available.

Patch for 5.3 and HEAD: http://manuel.mausz.at/coding/patches/php/5.3.0/php-5.3.0-dns_get_record.patch
Tested on FreeBSD but should work on other BSDs and probably on OS X too.
 [2010-06-13 14:52 UTC] felipe@php.net
-Status: Assigned +Status: Feedback -Package: Feature/Change Request +Package: *General Issues -Assigned To: pollita +Assigned To:
 [2010-06-13 14:52 UTC] felipe@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2010-06-13 14:53 UTC] felipe@php.net
-Package: *General Issues +Package: Network related
 [2012-03-04 17:33 UTC] rasmus@php.net
This doesn't seem to be an issue anymore with recent versions
 [2012-03-04 17:33 UTC] rasmus@php.net
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: rasmus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC