Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77425 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79505 invoked from network); 22 Sep 2014 07:07:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2014 07:07:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.180 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.214.180 mail-ob0-f180.google.com Received: from [209.85.214.180] ([209.85.214.180:34462] helo=mail-ob0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/11-08225-A9ACF145 for ; Mon, 22 Sep 2014 03:07:06 -0400 Received: by mail-ob0-f180.google.com with SMTP id wn1so3148408obc.39 for ; Mon, 22 Sep 2014 00:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=w/8W3/GF3N31VpZMTZ310z450eUZos+Amd0DY5TnRVY=; b=Ek58bY6oCuLaX/PgCFu645yfB/xsqtqHsVLyinOsRvH2cLzZctuTvJ0oq7jx++/0PS 3IRsg5hUKwjrFy9DjmtsGT+DXqqA6vzIaDI2j0pkAgSmLE9hhoCsVpzhHVbZ+iyZUZk/ 6gSc/glPG+y45r5ngPLgvpTs3oNwFuaQ7deU60OgVLudEcW6z1x1dL6Fw1Q+nRdWMUkX UsEwZBOFwb6g0nqt2YZqF+U7XSHUf8sABdhNkkg9TAejNQQv+MPB5gA/VakpEN/NuC7c XRz3PueqpY34lWbcAbOEr75b3dp+OJ8rL9Ew7jRQHtI8kGalZEnogAiMEfRHbHbhXVE1 G63g== MIME-Version: 1.0 X-Received: by 10.60.134.76 with SMTP id pi12mr17511330oeb.51.1411369624127; Mon, 22 Sep 2014 00:07:04 -0700 (PDT) Received: by 10.202.227.206 with HTTP; Mon, 22 Sep 2014 00:07:04 -0700 (PDT) Received: by 10.202.227.206 with HTTP; Mon, 22 Sep 2014 00:07:04 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Sep 2014 00:07:04 -0700 Message-ID: To: Pierre Joye Cc: PHP internals list Content-Type: multipart/alternative; boundary=047d7b47201217ce800503a21923 Subject: Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior From: kris.craig@gmail.com (Kris Craig) --047d7b47201217ce800503a21923 Content-Type: text/plain; charset=UTF-8 On Sep 21, 2014 11:52 PM, "Pierre Joye" wrote: > > hi Kris, > > On Sat, Sep 20, 2014 at 4:15 AM, Kris Craig wrote: > > Per discussion in an earlier thread. Here's the RFC: > > > > https://wiki.php.net/rfc/checkdnsrr-default-type > > > > > > Basically, this RFC seeks to make it so that PHP's checkdnsrr() function, > > which is most commonly used to see whether or not a hostname exists, no > > longer restricts itself to only MX records by default. > > > > Though the RFC itself is a no-brainer, the more difficult question is which > > solution should be implemented. The two options currently presented are > > changing default from "MX" to "ANY", which would cause it to check all > > records and not just MX; and getting rid of the default altogether and > > making it so that the argument is required. > > > > From what I can tell, there are valid arguments to be made for both, so I > > would love to see some discussion/debate here regarding which solution > > should be implemented, as I'm currently undecided. Also please feel free > > to point out any areas of improvement for the RFC itself. > > I am not sure which problem this RFC tries to solve, do you have any > example showing the issues please? > > Cheers, > -- > Pierre > > @pierrejoye | http://www.libgd.org It's not a bug or anything. The problem is that the current behavior is very counter-intuitive, not to mention unnecessary because there's already another function dedicated to MX lookups. At my job, we wasted a good deal of time troubleshooting what appeared to be a weird DNS issue that turned out to just be a checkdnsrr() lookup that was looking only for MX records because a second argument wasn't passed. I cannot think of any use case served by this behavior. --Kris --047d7b47201217ce800503a21923--