FAQ
I went to look at the bug Pierre mention earlier and noticed that
dns_get_record isn't implemented on OS X, this looks to be down to the
fact that it has a bind 8 BC layer that we use by default for some
reason. I tried to make it use the bind 9 interface but it wasn't a
simple task as some other things were missing.

End result here is a patch that allows bind 8 to work and therefore OS
X, the main difference is that there is a shared _res structure rather
than a per request one.

I'll apply this tomorrow if no one has any objections.

Scott

Search Discussions

  • Kalle Sommer Nielsen at Jan 7, 2009 at 6:50 am
    Hi Scott

    2009/1/7 Scott MacVicar <scott@macvicar.net>:
    I went to look at the bug Pierre mention earlier and noticed that
    dns_get_record isn't implemented on OS X, this looks to be down to the fact
    that it has a bind 8 BC layer that we use by default for some reason. I
    tried to make it use the bind 9 interface but it wasn't a simple task as
    some other things were missing.

    End result here is a patch that allows bind 8 to work and therefore OS X,
    the main difference is that there is a shared _res structure rather than a
    per request one.
    Does this mean it will also work on BSD? As far I remember then
    dns_get_record wasn't implemented on BSD aswell. If not then it would
    be ideal to support it if OSX is patched :)
    I'll apply this tomorrow if no one has any objections.

    Scott


    --
    Kalle Sommer Nielsen
  • Hannes Magnusson at Jan 7, 2009 at 8:06 am

    On Wed, Jan 7, 2009 at 07:49, Kalle Sommer Nielsen wrote:
    Hi Scott

    2009/1/7 Scott MacVicar <scott@macvicar.net>:
    I went to look at the bug Pierre mention earlier and noticed that
    dns_get_record isn't implemented on OS X, this looks to be down to the fact
    that it has a bind 8 BC layer that we use by default for some reason. I
    tried to make it use the bind 9 interface but it wasn't a simple task as
    some other things were missing.

    End result here is a patch that allows bind 8 to work and therefore OS X,
    the main difference is that there is a shared _res structure rather than a
    per request one.
    Does this mean it will also work on BSD? As far I remember then
    dns_get_record wasn't implemented on BSD aswell. If not then it would
    FreeBSD ports have had their own patch for years.

    -Hannes
  • Scott MacVicar at Jan 7, 2009 at 1:04 pm
    Hi Kalle,
    Kalle Sommer Nielsen wrote:
    Hi Scott

    2009/1/7 Scott MacVicar <scott@macvicar.net>:
    I went to look at the bug Pierre mention earlier and noticed that
    dns_get_record isn't implemented on OS X, this looks to be down to the fact
    that it has a bind 8 BC layer that we use by default for some reason. I
    tried to make it use the bind 9 interface but it wasn't a simple task as
    some other things were missing.

    End result here is a patch that allows bind 8 to work and therefore OS X,
    the main difference is that there is a shared _res structure rather than a
    per request one.
    Does this mean it will also work on BSD? As far I remember then
    dns_get_record wasn't implemented on BSD aswell. If not then it would
    be ideal to support it if OSX is patched :)
    Yeah it would work on all of the BSDs, though we have some wierd
    bastardisation of bind8 and bind9 code in dns.c, I think some gentle
    refactoring is in order to get this in a bit better shape.

    OS X actually has res_nmkquery but AC_CHECK_FUNC can't correctly detect
    this because of the way its defined in resolv.h, it's something like this.

    #define res_nmkquery bind_9_nmkquery

    AC_CHECK_FUNC does an #undef res_nmkquery as part of its test resulting
    in the failure.

    FreeBSD has __res_nmkquery but unfortunately PHP_CHECK_FUNC when
    checking for res_nmkquery OR __res_nmkquery it doesn't tell you which
    one it found.

    I'll fix this in stages I guess, starting with the autoconf fun.

    Scott
  • Pierre Joye at Jan 7, 2009 at 9:24 am
    hi,
    On Wed, Jan 7, 2009 at 4:30 AM, Scott MacVicar wrote:
    I went to look at the bug Pierre mention earlier and noticed that
    dns_get_record isn't implemented on OS X, this looks to be down to the fact
    that it has a bind 8 BC layer that we use by default for some reason. I
    tried to make it use the bind 9 interface but it wasn't a simple task as
    some other things were missing.

    End result here is a patch that allows bind 8 to work and therefore OS X,
    the main difference is that there is a shared _res structure rather than a
    per request one.
    Please look at (1st result in google or bugs.php.net :):

    http://bugs.php.net/bug.php?id=29337
    I'll apply this tomorrow if no one has any objections.
    About FreeBSD:

    http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/php5/files/patch-ext_standard_dns.h


    Cheers,
  • Pierre Joye at Jan 7, 2009 at 9:26 am
    hi,
    On Wed, Jan 7, 2009 at 4:30 AM, Scott MacVicar wrote:
    I went to look at the bug Pierre mention earlier and noticed that
    dns_get_record isn't implemented on OS X, this looks to be down to the fact
    that it has a bind 8 BC layer that we use by default for some reason. I
    tried to make it use the bind 9 interface but it wasn't a simple task as
    some other things were missing.

    End result here is a patch that allows bind 8 to work and therefore OS X,
    the main difference is that there is a shared _res structure rather than a
    per request one.
    Please look at (1st result in google or bugs.php.net :):

    http://bugs.php.net/bug.php?id=29337
    I'll apply this tomorrow if no one has any objections.
    About FreeBSD:

    http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/php5/files/patch-ext_standard_dns.h


    Cheers,
  • Pierre Joye at Jan 7, 2009 at 9:44 am
    hi,
    On Wed, Jan 7, 2009 at 10:26 AM, Pierre Joye wrote:

    Please look at (1st result in google or bugs.php.net :):

    http://bugs.php.net/bug.php?id=29337
    I'll apply this tomorrow if no one has any objections.
    About FreeBSD:

    http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/php5/files/patch-ext_standard_dns.h
    On a sidenote, I would suggest to take a look at the djbdns library,
    which is available on almost all platform and seems to be much cleaner
    than bind(8|9): http://cr.yp.to/djbdns/dns.html

    Cheers,
  • Ronald Chmara at Jan 7, 2009 at 10:57 am

    On Jan 7, 2009, at 1:44 AM, Pierre Joye wrote:
    On a sidenote, I would suggest to take a look at the djbdns library,
    which is available on almost all platform and seems to be much cleaner
    than bind(8|9): http://cr.yp.to/djbdns/dns.html
    Technical issue: While available, it is not installed (by default) on
    as many platforms as the bind libraries.
    Non-Technical issue: <redacted>

    -Bop

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedJan 7, '09 at 3:30a
activeJan 7, '09 at 1:04p
posts8
users5
websitephp.net

People

Translate

site design / logo © 2022 Grokbase