Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-23 Thread Michael Wallner
On 2014-09-23 06:00, Sanford Whiteman wrote: What would happen is it'd throw an E_DEPRECATED for at least the remainder of 5.x, then throw the usual E_WARNING for a missing argument starting in 7.x with no default. Sounds OK to me now that I've noticed this:

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-23 Thread Kris Craig
On Tue, Sep 23, 2014 at 12:24 AM, Michael Wallner m...@php.net wrote: On 2014-09-23 06:00, Sanford Whiteman wrote: What would happen is it'd throw an E_DEPRECATED for at least the remainder of 5.x, then throw the usual E_WARNING for a missing argument starting in 7.x with no default.

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-23 Thread Michael Wallner
On 2014-09-23 09:30, Kris Craig wrote: On Tue, Sep 23, 2014 at 12:24 AM, Michael Wallner m...@php.net mailto:m...@php.net wrote: On 2014-09-23 06:00, Sanford Whiteman wrote: What would happen is it'd throw an E_DEPRECATED for at least the remainder of 5.x, then throw

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-23 Thread Sanford Whiteman
I don't think you tracked the behavior in the bug report. If checkdnsrr() is doing an MX query -- not including implicit MX, only explicit MX -- it must fail when there is no MX record. It can't return `true` when there is a CNAME (and no MX record for the canonical hostname, only an A) but

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-23 Thread Kris Craig
On Tue, Sep 23, 2014 at 12:38 AM, Michael Wallner m...@php.net wrote: On 2014-09-23 09:30, Kris Craig wrote: On Tue, Sep 23, 2014 at 12:24 AM, Michael Wallner m...@php.net mailto:m...@php.net wrote: On 2014-09-23 06:00, Sanford Whiteman wrote: What would happen is it'd

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-23 Thread Pierre Joye
On Tue, Sep 23, 2014 at 9:41 AM, Sanford Whiteman figureone...@gmail.com wrote: I don't think you tracked the behavior in the bug report. If checkdnsrr() is doing an MX query -- not including implicit MX, only explicit MX -- it must fail when there is no MX record. It can't return `true` when

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-23 Thread Sanford Whiteman
if somehost.example.com has the MX, it should return true with checkdnsrr('somehost.example.com'). If example has the MX set to somehost.example.com or similar, it should return true as well. Or am I missing your point? You are missing it, as there are no MX records involved. I'm

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-23 Thread Michael Wallner
On 2014-09-23 10:11, Sanford Whiteman wrote: if somehost.example.com has the MX, it should return true with checkdnsrr('somehost.example.com'). If example has the MX set to somehost.example.com or similar, it should return true as well. Or am I missing your point? You are missing it, as

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-23 Thread Michael Wallner
On 2014-09-23 10:47, Michael Wallner wrote: On 2014-09-23 10:11, Sanford Whiteman wrote: if somehost.example.com has the MX, it should return true with checkdnsrr('somehost.example.com'). If example has the MX set to somehost.example.com or similar, it should return true as well. Or am I

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-23 Thread Sanford Whiteman
Hi Mike, So it could still be seen as works as expected, because it just checks if any answer is received. If that functionality is useful could be debatable. That's not expected. Chasing (dereferencing) CNAMEs is one of the understood burdens of any DNS app; you can't treat the CNAME itself

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-22 Thread Pierre Joye
hi Kris, On Sat, Sep 20, 2014 at 4:15 AM, Kris Craig kris.cr...@gmail.com 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

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-22 Thread Kris Craig
On Sep 21, 2014 11:52 PM, Pierre Joye pierre@gmail.com wrote: hi Kris, On Sat, Sep 20, 2014 at 4:15 AM, Kris Craig kris.cr...@gmail.com wrote: Per discussion in an earlier thread. Here's the RFC: https://wiki.php.net/rfc/checkdnsrr-default-type Basically, this RFC seeks to

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-22 Thread Pierre Joye
On Mon, Sep 22, 2014 at 9:07 AM, Kris Craig kris.cr...@gmail.com wrote: On Sep 21, 2014 11:52 PM, Pierre Joye pierre@gmail.com wrote: Well, for what I can see users already take into account this part of the issue then: https://github.com/search?l=phpq=checkdnsrrtype=Codeutf8=%E2%9C%93

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-22 Thread Kris Craig
On Sep 22, 2014 1:09 AM, Pierre Joye pierre@gmail.com wrote: On Mon, Sep 22, 2014 at 9:07 AM, Kris Craig kris.cr...@gmail.com wrote: On Sep 21, 2014 11:52 PM, Pierre Joye pierre@gmail.com wrote: Well, for what I can see users already take into account this part of the issue then:

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-22 Thread Pierre Joye
On Mon, Sep 22, 2014 at 10:56 AM, Kris Craig kris.cr...@gmail.com wrote: On Sep 22, 2014 1:09 AM, Pierre Joye pierre@gmail.com wrote: On Mon, Sep 22, 2014 at 9:07 AM, Kris Craig kris.cr...@gmail.com wrote: On Sep 21, 2014 11:52 PM, Pierre Joye pierre@gmail.com wrote: Well, for

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-22 Thread Kris Craig
On Sep 22, 2014 2:16 AM, Pierre Joye pierre@gmail.com wrote: On Mon, Sep 22, 2014 at 10:56 AM, Kris Craig kris.cr...@gmail.com wrote: On Sep 22, 2014 1:09 AM, Pierre Joye pierre@gmail.com wrote: On Mon, Sep 22, 2014 at 9:07 AM, Kris Craig kris.cr...@gmail.com wrote: On Sep

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-22 Thread Pierre Joye
On Mon, Sep 22, 2014 at 11:56 AM, Kris Craig kris.cr...@gmail.com wrote: On Sep 22, 2014 2:16 AM, Pierre Joye pierre@gmail.com wrote: On Mon, Sep 22, 2014 at 10:56 AM, Kris Craig kris.cr...@gmail.com wrote: On Sep 22, 2014 1:09 AM, Pierre Joye pierre@gmail.com wrote: On Mon,

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-22 Thread Sanford Whiteman
Hi Kris, On a broad level, your RFC asserts that checkdnsrr() is used to determine whether or not a hostname exists, but you don't actually define exists. It seems to me you're glossing over the fact that existence is application-specific and doesn't add up to one single RR type or set of types.

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-22 Thread Kris Craig
On Mon, Sep 22, 2014 at 8:09 PM, Sanford Whiteman figureone...@gmail.com wrote: Hi Kris, On a broad level, your RFC asserts that checkdnsrr() is used to determine whether or not a hostname exists, but you don't actually define exists. It seems to me you're glossing over the fact that

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-22 Thread Sanford Whiteman
What would happen is it'd throw an E_DEPRECATED for at least the remainder of 5.x, then throw the usual E_WARNING for a missing argument starting in 7.x with no default. Sounds OK to me now that I've noticed this: https://bugs.php.net/bug.php?id=68081 Pretty sure that's a sane report,

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-21 Thread Kris Craig
I checked and it looks like E_WARNING is what we currently throw for that. Should we consider changing that to E_ERROR? I mean, if a function *requires* an argument that's missing, I don't think we'd want that script execution to continue. What's the reasoning behind the current behavior of just

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-20 Thread Kris Craig
On Sep 19, 2014 10:50 PM, Michael Wallner m...@php.net wrote: On 20 Sep 2014 04:15, Kris Craig kris.cr...@gmail.com wrote: 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

[PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-19 Thread Kris Craig
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

Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior

2014-09-19 Thread Michael Wallner
On 20 Sep 2014 04:15, Kris Craig kris.cr...@gmail.com wrote: 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