FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16503&edit=1

ID: 16503
Updated by: daniel.oconnor@gmail.com
Reported By: Dmitry dot Stolyarov at gmail dot com
Summary: Creating SOA RR from string doesn't work
-Status: Open
+Status: Verified
Type: Bug
Package: Net_DNS
Operating System: Gentoo Linux
Package Version: 1.0.1
PHP Version: 5.2.10
Roadmap Versions:
New Comment:

-Status: Open
+Status: Verified
Added test coverage


Previous Comments:
------------------------------------------------------------------------

[2009-08-09 15:37:47] dmitrystolyarov

-PHP Version: 5.2.5
+PHP Version: 5.2.10


------------------------------------------------------------------------

[2009-08-09 15:37:38] dmitrystolyarov

The following patch has been added/updated:

Patch Name: soa-rr-from-string.patch
Revision: 1249828658
URL:
http://pear.php.net/bugs/patch-display.php?bug=16503&patch=soa-rr-from-string.patch&revision=1249828658&display=1

------------------------------------------------------------------------

[2009-08-09 15:37:12] dmitrystolyarov

Description:
------------
This problem is due to two SOA_RR's constructor errors:
* ereg() function gets undefined variable $string as argument instead
of real data stored in $data;
* regular expression contains some errors.

Patch is attached.

Test script:
---------------
$rr = Net_DNS_RR::factory('example.com. 3600 IN SOA ns.example.com.
support.example.com. 8 3600 600 1209600 3600');

print_r($rr);

Expected result:
----------------
Net_DNS_RR_SOA Object
(
[name] => example.com
[type] => SOA
[class] => IN
[ttl] => 3600
[rdlength] => 0
[rdata] =>
[mname] => ns.example.com
[rname] => support.example.com
[serial] => 8
[refresh] => 3600
[retry] => 600
[expire] => 1209600
[minimum] => 3600
)

Actual result:
--------------
Net_DNS_RR_SOA Object
(
[name] => example.com
[type] => SOA
[class] => IN
[ttl] => 3600
[rdlength] => 0
[rdata] =>
[mname] =>
[rname] =>
[serial] =>
[refresh] =>
[retry] =>
[expire] =>
[minimum] =>
)

------------------------------------------------------------------------

Search Discussions

  • Daniel Oconnor at Feb 21, 2010 at 11:25 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=16503&edit=1

    ID: 16503
    Updated by: daniel.oconnor@gmail.com
    Reported By: Dmitry dot Stolyarov at gmail dot com
    Summary: Creating SOA RR from string doesn't work
    -Status: Verified
    +Status: Feedback
    Type: Bug
    Package: Net_DNS
    Operating System: Gentoo Linux
    Package Version: 1.0.1
    PHP Version: 5.2.10
    Roadmap Versions:
    New Comment:

    -Status: Verified
    +Status: Feedback
    Patches applied in SVN


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-02-21 22:40:56] doconnor

    -Status: Open
    +Status: Verified
    Added test coverage

    ------------------------------------------------------------------------

    [2009-08-09 15:37:47] dmitrystolyarov

    -PHP Version: 5.2.5
    +PHP Version: 5.2.10


    ------------------------------------------------------------------------

    [2009-08-09 15:37:38] dmitrystolyarov

    The following patch has been added/updated:

    Patch Name: soa-rr-from-string.patch
    Revision: 1249828658
    URL:
    http://pear.php.net/bugs/patch-display.php?bug=16503&patch=soa-rr-from-string.patch&revision=1249828658&display=1

    ------------------------------------------------------------------------

    [2009-08-09 15:37:12] dmitrystolyarov

    Description:
    ------------
    This problem is due to two SOA_RR's constructor errors:
    * ereg() function gets undefined variable $string as argument instead
    of real data stored in $data;
    * regular expression contains some errors.

    Patch is attached.

    Test script:
    ---------------
    $rr = Net_DNS_RR::factory('example.com. 3600 IN SOA ns.example.com.
    support.example.com. 8 3600 600 1209600 3600');

    print_r($rr);

    Expected result:
    ----------------
    Net_DNS_RR_SOA Object
    (
    [name] => example.com
    [type] => SOA
    [class] => IN
    [ttl] => 3600
    [rdlength] => 0
    [rdata] =>
    [mname] => ns.example.com
    [rname] => support.example.com
    [serial] => 8
    [refresh] => 3600
    [retry] => 600
    [expire] => 1209600
    [minimum] => 3600
    )

    Actual result:
    --------------
    Net_DNS_RR_SOA Object
    (
    [name] => example.com
    [type] => SOA
    [class] => IN
    [ttl] => 3600
    [rdlength] => 0
    [rdata] =>
    [mname] =>
    [rname] =>
    [serial] =>
    [refresh] =>
    [retry] =>
    [expire] =>
    [minimum] =>
    )

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedFeb 21, '10 at 10:44p
activeFeb 21, '10 at 11:25p
posts2
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 2 posts

People

Translate

site design / logo © 2022 Grokbase