<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=Net_DNS</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/16516" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16504" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16503" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16502" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16501" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16334" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16312" />
      <rdf:li rdf:resource="http://pear.php.net/bug/15978" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14830" />
      <rdf:li rdf:resource="http://pear.php.net/bug/13593" />
      <rdf:li rdf:resource="http://pear.php.net/bug/11665" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/16516">
      <title>Net_DNS: Bug 16516 [Open] Saving TXT RR in the binary format doesn't work correctly</title>
      <link>http://pear.php.net/bugs/16516</link>
      <content:encoded><![CDATA[<pre>Net_DNS Bug
Reported by dmitrystolyarov
2009-08-11T23:26:17+00:00
PHP: 5.2.10 OS: Gentoo Linux Package Version: 1.0.1

Description:
------------
Patch tested against ISC BIND (9.4.2 &amp; 9.4.3) attached.

Test script:
---------------
$r = new Net_DNS_Resolver();
$txt_rr = reset($r-&gt;query('example.com.', 'TXT')-&gt;answer);

echo $txt_rr-&gt;string() . &quot;\n&quot;;
echo $txt_rr-&gt;rr_rdata(0, 0) . &quot;\n&quot;;

Expected result:
----------------
example.com.		3600	IN	TXT	&quot;x&quot; &quot;y&quot; &quot;z&quot;
xyz

Actual result:
--------------
example.com.		3600	IN	TXT	&quot;x&quot; &quot;y&quot; &quot;z&quot;
Array</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_DNS Bug
Reported by dmitrystolyarov
2009-08-11T23:26:17+00:00
PHP: 5.2.10 OS: Gentoo Linux Package Version: 1.0.1

Description:
------------
Patch tested against ISC BIND (9.4.2 &amp; 9.4.3) attached.

Test script:
---------------
$r = new Net_DNS_Resolver();
$txt_rr = reset($r-&gt;query('example.com.', 'TXT')-&gt;answer);

echo $txt_rr-&gt;string() . &quot;\n&quot;;
echo $txt_rr-&gt;rr_rdata(0, 0) . &quot;\n&quot;;

Expected result:
----------------
example.com.		3600	IN	TXT	&quot;x&quot; &quot;y&quot; &quot;z&quot;
xyz

Actual result:
--------------
example.com.		3600	IN	TXT	&quot;x&quot; &quot;y&quot; &quot;z&quot;
Array</pre>]]></description>
      <dc:date>2009-08-11T23:30:34+00:00</dc:date>
      <dc:creator>Dmitry &amp;#x64;&amp;#111;&amp;#x74; Stolyarov &amp;#x61;&amp;#116; trueoffice &amp;#x64;&amp;#111;&amp;#x74; ru</dc:creator>
      <dc:subject>Net_DNS Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16504">
      <title>Net_DNS: Bug 16504 [Open] Unable to create RR from array</title>
      <link>http://pear.php.net/bugs/16504</link>
      <content:encoded><![CDATA[<pre>Net_DNS Bug
Reported by dmitrystolyarov
2009-08-09T22:02:23+00:00
PHP: 5.2.10 OS: Gentoo Linux Package Version: 1.0.1

Description:
------------
Creating RR with Net_DNS_RR::new_from_array doesn't work properly:
 * Typo in lines 223 &amp; 224 (RR.php) makes function unable to find necessary class and returns object of base class.
 * Fixing the typo described above causes created objects to become empty (they contain name &amp; ttl only) if rdata is missing in array but specific (for this type) fields are given (e.g. address for type A).

Solving this problem caused to fix constructors of all RR classes. Patch is attached.

Test script:
---------------
$rr = Net_DNS_RR::new_from_array(array('type' =&gt; 'A', 'name' =&gt; 'example.com', 'ttl' =&gt; '3600' , 'address' =&gt; '192.168.0.15'));

echo get_class($rr) . &quot;\n&quot;;

Expected result:
----------------
Net_DNS_RR_A

Actual result:
--------------
Net_DNS_RR</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_DNS Bug
Reported by dmitrystolyarov
2009-08-09T22:02:23+00:00
PHP: 5.2.10 OS: Gentoo Linux Package Version: 1.0.1

Description:
------------
Creating RR with Net_DNS_RR::new_from_array doesn't work properly:
 * Typo in lines 223 &amp; 224 (RR.php) makes function unable to find necessary class and returns object of base class.
 * Fixing the typo described above causes created objects to become empty (they contain name &amp; ttl only) if rdata is missing in array but specific (for this type) fields are given (e.g. address for type A).

Solving this problem caused to fix constructors of all RR classes. Patch is attached.

Test script:
---------------
$rr = Net_DNS_RR::new_from_array(array('type' =&gt; 'A', 'name' =&gt; 'example.com', 'ttl' =&gt; '3600' , 'address' =&gt; '192.168.0.15'));

echo get_class($rr) . &quot;\n&quot;;

Expected result:
----------------
Net_DNS_RR_A

Actual result:
--------------
Net_DNS_RR</pre>]]></description>
      <dc:date>2009-08-09T22:02:52+00:00</dc:date>
      <dc:creator>Dmitry &amp;#x64;&amp;#111;&amp;#x74; Stolyarov &amp;#x61;&amp;#116; trueoffice &amp;#x64;&amp;#111;&amp;#x74; ru</dc:creator>
      <dc:subject>Net_DNS Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16503">
      <title>Net_DNS: Bug 16503 [Open] Creating SOA RR from string doesn't work</title>
      <link>http://pear.php.net/bugs/16503</link>
      <content:encoded><![CDATA[<pre>Net_DNS Bug
Reported by dmitrystolyarov
2009-08-09T14:37:12+00:00
PHP: 5.2.10 OS: Gentoo Linux Package Version: 1.0.1

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] =&gt; example.com
    [type] =&gt; SOA
    [class] =&gt; IN
    [ttl] =&gt; 3600
    [rdlength] =&gt; 0
    [rdata] =&gt; 
    [mname] =&gt; ns.example.com
    [rname] =&gt; support.example.com
    [serial] =&gt; 8
    [refresh] =&gt; 3600
    [retry] =&gt; 600
    [expire] =&gt; 1209600
    [minimum] =&gt; 3600
)

Actual result:
--------------
Net_DNS_RR_SOA Object
(
    [name] =&gt; example.com
    [type] =&gt; SOA
    [class] =&gt; IN
    [ttl] =&gt; 3600
    [rdlength] =&gt; 0
    [rdata] =&gt; 
    [mname] =&gt; 
    [rname] =&gt; 
    [serial] =&gt; 
    [refresh] =&gt; 
    [retry] =&gt; 
    [expire] =&gt; 
    [minimum] =&gt; 
)</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_DNS Bug
Reported by dmitrystolyarov
2009-08-09T14:37:12+00:00
PHP: 5.2.10 OS: Gentoo Linux Package Version: 1.0.1

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] =&gt; example.com
    [type] =&gt; SOA
    [class] =&gt; IN
    [ttl] =&gt; 3600
    [rdlength] =&gt; 0
    [rdata] =&gt; 
    [mname] =&gt; ns.example.com
    [rname] =&gt; support.example.com
    [serial] =&gt; 8
    [refresh] =&gt; 3600
    [retry] =&gt; 600
    [expire] =&gt; 1209600
    [minimum] =&gt; 3600
)

Actual result:
--------------
Net_DNS_RR_SOA Object
(
    [name] =&gt; example.com
    [type] =&gt; SOA
    [class] =&gt; IN
    [ttl] =&gt; 3600
    [rdlength] =&gt; 0
    [rdata] =&gt; 
    [mname] =&gt; 
    [rname] =&gt; 
    [serial] =&gt; 
    [refresh] =&gt; 
    [retry] =&gt; 
    [expire] =&gt; 
    [minimum] =&gt; 
)</pre>]]></description>
      <dc:date>2009-08-09T14:37:47+00:00</dc:date>
      <dc:creator>Dmitry &amp;#x64;&amp;#111;&amp;#x74; Stolyarov &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Net_DNS Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16502">
      <title>Net_DNS: Bug 16502 [Open] Warnings while parsing answer signed with TSIG</title>
      <link>http://pear.php.net/bugs/16502</link>
      <content:encoded><![CDATA[<pre>Net_DNS Bug
Reported by dmitrystolyarov
2009-08-09T14:32:38+00:00
PHP: 5.2.10 OS: Gentoo Linux Package Version: 1.0.1

Description:
------------
There are two erros in TSIG_RR's constructor's part that deals with binary data parsing:
 * line 64 (with unpack): in the beginning of format string we can see backslash (&quot;\&quot;) that should not be here;
 * line 82: &quot;other_data&quot; is empty if BADTIME error didn't occur (according to RFC2845).

Patch tested against ISC BIND (9.4.2 &amp; 9.4.3) attached.

Test script:
---------------
$resolver = new Net_DNS_Resolver(array('nameservers' =&gt; array('192.168.0.1')));

$packet = new Net_DNS_Packet();

$packet-&gt;header = new Net_DNS_Header();
$packet-&gt;header-&gt;id = $resolver-&gt;nextid();
$packet-&gt;header-&gt;qr = 0;
$packet-&gt;header-&gt;opcode = &quot;UPDATE&quot;;

$packet-&gt;question[0] = new Net_DNS_Question('example.com', 'SOA', 'IN');
$packet-&gt;answer = array();

$packet-&gt;authority[0] = Net_DNS_RR::factory('example.com. 0 ANY A');
$packet-&gt;authority[1] = Net_DNS_RR::factory('example.com. 1800 IN A 192.168.0.2');

$tsig = Net_DNS_RR::factory('example-key TSIG 6i7jUkH1LXDnMKc7ElBKXQ==');
$packet-&gt;additional = array($tsig);

$packet-&gt;header-&gt;qdcount = count($packet-&gt;question);
$packet-&gt;header-&gt;ancount = count($packet-&gt;answer);
$packet-&gt;header-&gt;nscount = count($packet-&gt;authority);
$packet-&gt;header-&gt;arcount = count($packet-&gt;additional);

$response = $resolver-&gt;send_tcp($packet, $packet-&gt;data());

echo $response-&gt;header-&gt;rcode . &quot;\n&quot;;

Expected result:
----------------
NOERROR

Actual result:
--------------
Warning: unpack(): Invalid format type \ in /usr/share/php/Net/DNS/RR/TSIG.php on line 64

Call Stack:
    0.0002     118120   1. {main}() /home/mrms-dos/Desktop/test.php:0
    0.0122    1530800   2. Net_DNS_Resolver-&gt;send_tcp() /home/mrms-dos/Desktop/test.php:28
    0.0154    1544520   3. Net_DNS_Packet-&gt;parse() /usr/share/php/Net/DNS/Resolver.php:805
    0.0155    1547728   4. Net_DNS_Packet-&gt;parse_rr() /usr/share/php/Net/DNS/Packet.php:290
    0.0157    1550328   5. Net_DNS_RR-&gt;factory() /usr/share/php/Net/DNS/Packet.php:568
    0.0157    1551336   6. Net_DNS_RR-&gt;new_from_data() /usr/share/php/Net/DNS/RR.php:81
    0.0157    1555064   7. Net_DNS_RR_TSIG-&gt;Net_DNS_RR_TSIG() /usr/share/php/Net/DNS/RR.php:101
    0.0158    1555808   8. unpack() /usr/share/php/Net/DNS/RR/TSIG.php:64

Warning: unpack(): Type n: not enough input, need 2, have 0 in /usr/share/php/Net/DNS/RR/TSIG.php on line 82

Call Stack:
    0.0002     118120   1. {main}() /home/mrms-dos/Desktop/test.php:0
    0.0127    1530800   2. Net_DNS_Resolver-&gt;send_tcp() /home/mrms-dos/Desktop/test.php:28
    0.0153    1544520   3. Net_DNS_Packet-&gt;parse() /usr/share/php/Net/DNS/Resolver.php:805
    0.0153    1547728   4. Net_DNS_Packet-&gt;parse_rr() /usr/share/php/Net/DNS/Packet.php:290
    0.0155    1550328   5. Net_DNS_RR-&gt;factory() /usr/share/php/Net/DNS/Packet.php:568
    0.0155    1551336   6. Net_DNS_RR-&gt;new_from_data() /usr/share/php/Net/DNS/RR.php:81
    0.0155    1555064   7. Net_DNS_RR_TSIG-&gt;Net_DNS_RR_TSIG() /usr/share/php/Net/DNS/RR.php:101
    0.0156    1557088   8. unpack() /usr/share/php/Net/DNS/RR/TSIG.php:82

NOERROR</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_DNS Bug
Reported by dmitrystolyarov
2009-08-09T14:32:38+00:00
PHP: 5.2.10 OS: Gentoo Linux Package Version: 1.0.1

Description:
------------
There are two erros in TSIG_RR's constructor's part that deals with binary data parsing:
 * line 64 (with unpack): in the beginning of format string we can see backslash (&quot;\&quot;) that should not be here;
 * line 82: &quot;other_data&quot; is empty if BADTIME error didn't occur (according to RFC2845).

Patch tested against ISC BIND (9.4.2 &amp; 9.4.3) attached.

Test script:
---------------
$resolver = new Net_DNS_Resolver(array('nameservers' =&gt; array('192.168.0.1')));

$packet = new Net_DNS_Packet();

$packet-&gt;header = new Net_DNS_Header();
$packet-&gt;header-&gt;id = $resolver-&gt;nextid();
$packet-&gt;header-&gt;qr = 0;
$packet-&gt;header-&gt;opcode = &quot;UPDATE&quot;;

$packet-&gt;question[0] = new Net_DNS_Question('example.com', 'SOA', 'IN');
$packet-&gt;answer = array();

$packet-&gt;authority[0] = Net_DNS_RR::factory('example.com. 0 ANY A');
$packet-&gt;authority[1] = Net_DNS_RR::factory('example.com. 1800 IN A 192.168.0.2');

$tsig = Net_DNS_RR::factory('example-key TSIG 6i7jUkH1LXDnMKc7ElBKXQ==');
$packet-&gt;additional = array($tsig);

$packet-&gt;header-&gt;qdcount = count($packet-&gt;question);
$packet-&gt;header-&gt;ancount = count($packet-&gt;answer);
$packet-&gt;header-&gt;nscount = count($packet-&gt;authority);
$packet-&gt;header-&gt;arcount = count($packet-&gt;additional);

$response = $resolver-&gt;send_tcp($packet, $packet-&gt;data());

echo $response-&gt;header-&gt;rcode . &quot;\n&quot;;

Expected result:
----------------
NOERROR

Actual result:
--------------
Warning: unpack(): Invalid format type \ in /usr/share/php/Net/DNS/RR/TSIG.php on line 64

Call Stack:
    0.0002     118120   1. {main}() /home/mrms-dos/Desktop/test.php:0
    0.0122    1530800   2. Net_DNS_Resolver-&gt;send_tcp() /home/mrms-dos/Desktop/test.php:28
    0.0154    1544520   3. Net_DNS_Packet-&gt;parse() /usr/share/php/Net/DNS/Resolver.php:805
    0.0155    1547728   4. Net_DNS_Packet-&gt;parse_rr() /usr/share/php/Net/DNS/Packet.php:290
    0.0157    1550328   5. Net_DNS_RR-&gt;factory() /usr/share/php/Net/DNS/Packet.php:568
    0.0157    1551336   6. Net_DNS_RR-&gt;new_from_data() /usr/share/php/Net/DNS/RR.php:81
    0.0157    1555064   7. Net_DNS_RR_TSIG-&gt;Net_DNS_RR_TSIG() /usr/share/php/Net/DNS/RR.php:101
    0.0158    1555808   8. unpack() /usr/share/php/Net/DNS/RR/TSIG.php:64

Warning: unpack(): Type n: not enough input, need 2, have 0 in /usr/share/php/Net/DNS/RR/TSIG.php on line 82

Call Stack:
    0.0002     118120   1. {main}() /home/mrms-dos/Desktop/test.php:0
    0.0127    1530800   2. Net_DNS_Resolver-&gt;send_tcp() /home/mrms-dos/Desktop/test.php:28
    0.0153    1544520   3. Net_DNS_Packet-&gt;parse() /usr/share/php/Net/DNS/Resolver.php:805
    0.0153    1547728   4. Net_DNS_Packet-&gt;parse_rr() /usr/share/php/Net/DNS/Packet.php:290
    0.0155    1550328   5. Net_DNS_RR-&gt;factory() /usr/share/php/Net/DNS/Packet.php:568
    0.0155    1551336   6. Net_DNS_RR-&gt;new_from_data() /usr/share/php/Net/DNS/RR.php:81
    0.0155    1555064   7. Net_DNS_RR_TSIG-&gt;Net_DNS_RR_TSIG() /usr/share/php/Net/DNS/RR.php:101
    0.0156    1557088   8. unpack() /usr/share/php/Net/DNS/RR/TSIG.php:82

NOERROR</pre>]]></description>
      <dc:date>2009-08-09T14:35:02+00:00</dc:date>
      <dc:creator>Dmitry &amp;#x64;&amp;#111;&amp;#x74; Stolyarov &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Net_DNS Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16501">
      <title>Net_DNS: Bug 16501 [Open] TSIG doesn't work because of HMAC-MD5 being incorrect</title>
      <link>http://pear.php.net/bugs/16501</link>
      <content:encoded><![CDATA[<pre>Net_DNS Bug
Reported by dmitrystolyarov
2009-08-09T14:28:16+00:00
PHP: 5.2.10 OS: Gentoo Linux Package Version: 1.0.1

Description:
------------
Current function for computing HMAC-MD5:
 * should return binary string instead of HEX (it's the cause of error);
 * should be named hmac_md5 and have just 2 arguments (not 4): according to RFC2845, MD5 with 64-byte block size is supported only;
 * should use md5()'s second argument for getting binary string instead of converting HEX into binary string with pack().

The first thing (returning binary string instead of HEX) is critical and causes errors, and other stuff is just small enhancements.

Patch tested against ISC BIND (9.4.2 &amp; 9.4.3) attached.

Test script:
---------------
$resolver = new Net_DNS_Resolver(array('nameservers' =&gt; array('192.168.0.1')));

$packet = new Net_DNS_Packet();

$packet-&gt;header = new Net_DNS_Header();
$packet-&gt;header-&gt;id = $resolver-&gt;nextid();
$packet-&gt;header-&gt;qr = 0;
$packet-&gt;header-&gt;opcode = &quot;UPDATE&quot;;

$packet-&gt;question[0] = new Net_DNS_Question('example.com', 'SOA', 'IN');
$packet-&gt;answer = array();

$packet-&gt;authority[0] = Net_DNS_RR::factory('example.com. 0 ANY A');
$packet-&gt;authority[1] = Net_DNS_RR::factory('example.com. 1800 IN A 192.168.0.2');

$tsig = Net_DNS_RR::factory('example-key TSIG 6i7jUkH1LXDnMKc7ElBKXQ==');
$packet-&gt;additional = array($tsig);

$packet-&gt;header-&gt;qdcount = count($packet-&gt;question);
$packet-&gt;header-&gt;ancount = count($packet-&gt;answer);
$packet-&gt;header-&gt;nscount = count($packet-&gt;authority);
$packet-&gt;header-&gt;arcount = count($packet-&gt;additional);

$response = $resolver-&gt;send_tcp($packet, $packet-&gt;data());

echo $response-&gt;header-&gt;rcode . &quot;\n&quot;;

Expected result:
----------------
NOERROR

Actual result:
--------------
FORMERR</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_DNS Bug
Reported by dmitrystolyarov
2009-08-09T14:28:16+00:00
PHP: 5.2.10 OS: Gentoo Linux Package Version: 1.0.1

Description:
------------
Current function for computing HMAC-MD5:
 * should return binary string instead of HEX (it's the cause of error);
 * should be named hmac_md5 and have just 2 arguments (not 4): according to RFC2845, MD5 with 64-byte block size is supported only;
 * should use md5()'s second argument for getting binary string instead of converting HEX into binary string with pack().

The first thing (returning binary string instead of HEX) is critical and causes errors, and other stuff is just small enhancements.

Patch tested against ISC BIND (9.4.2 &amp; 9.4.3) attached.

Test script:
---------------
$resolver = new Net_DNS_Resolver(array('nameservers' =&gt; array('192.168.0.1')));

$packet = new Net_DNS_Packet();

$packet-&gt;header = new Net_DNS_Header();
$packet-&gt;header-&gt;id = $resolver-&gt;nextid();
$packet-&gt;header-&gt;qr = 0;
$packet-&gt;header-&gt;opcode = &quot;UPDATE&quot;;

$packet-&gt;question[0] = new Net_DNS_Question('example.com', 'SOA', 'IN');
$packet-&gt;answer = array();

$packet-&gt;authority[0] = Net_DNS_RR::factory('example.com. 0 ANY A');
$packet-&gt;authority[1] = Net_DNS_RR::factory('example.com. 1800 IN A 192.168.0.2');

$tsig = Net_DNS_RR::factory('example-key TSIG 6i7jUkH1LXDnMKc7ElBKXQ==');
$packet-&gt;additional = array($tsig);

$packet-&gt;header-&gt;qdcount = count($packet-&gt;question);
$packet-&gt;header-&gt;ancount = count($packet-&gt;answer);
$packet-&gt;header-&gt;nscount = count($packet-&gt;authority);
$packet-&gt;header-&gt;arcount = count($packet-&gt;additional);

$response = $resolver-&gt;send_tcp($packet, $packet-&gt;data());

echo $response-&gt;header-&gt;rcode . &quot;\n&quot;;

Expected result:
----------------
NOERROR

Actual result:
--------------
FORMERR</pre>]]></description>
      <dc:date>2009-08-09T14:34:49+00:00</dc:date>
      <dc:creator>Dmitry &amp;#x64;&amp;#111;&amp;#x74; Stolyarov &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Net_DNS Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16334">
      <title>Net_DNS: Bug 16334 [Open] doesn't work with mbstring.func_overload = 7</title>
      <link>http://pear.php.net/bugs/16334</link>
      <content:encoded><![CDATA[<pre>Net_DNS Bug
Reported by northshorefiend
2009-06-16T08:35:04+00:00
PHP: 5.2.5 OS: ubuntu Package Version: 1.0.1

Description:
------------
Net_DNS_Resolver-&gt;rawQuery doesn't return any results when mbstring.func_overload = 7 in php.ini

Test script:
---------------
$rootresolver = new Net_DNS_Resolver();
	$rootresolver-&gt;debug = 1;
	$rootresolver-&gt;usevc = 0;
	$rootresolver-&gt;recurse = 0;	// rui: important otherwise it's not iterative process and could get unexpected warnings.
	$rootresolver-&gt;nameservers = array(&lt;some dns server&gt;);

		$response = $rootresolver-&gt;rawQuery('google.com', 'A');

Expected result:
----------------
$response shouldn't always be empty



Actual result:
--------------
$response always empty

debug output shows corrupted characters</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_DNS Bug
Reported by northshorefiend
2009-06-16T08:35:04+00:00
PHP: 5.2.5 OS: ubuntu Package Version: 1.0.1

Description:
------------
Net_DNS_Resolver-&gt;rawQuery doesn't return any results when mbstring.func_overload = 7 in php.ini

Test script:
---------------
$rootresolver = new Net_DNS_Resolver();
	$rootresolver-&gt;debug = 1;
	$rootresolver-&gt;usevc = 0;
	$rootresolver-&gt;recurse = 0;	// rui: important otherwise it's not iterative process and could get unexpected warnings.
	$rootresolver-&gt;nameservers = array(&lt;some dns server&gt;);

		$response = $rootresolver-&gt;rawQuery('google.com', 'A');

Expected result:
----------------
$response shouldn't always be empty



Actual result:
--------------
$response always empty

debug output shows corrupted characters</pre>]]></description>
      <dc:date>2009-06-16T08:35:04+00:00</dc:date>
      <dc:creator>spam123 &amp;#x61;&amp;#116; JamesAshepherd &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Net_DNS Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16312">
      <title>Net_DNS: Bug 16312 [Open] DNS query returns no more than seven NAPTR records</title>
      <link>http://pear.php.net/bugs/16312</link>
      <content:encoded><![CDATA[<pre>Net_DNS Bug
Reported by renne
2009-06-09T17:48:03+00:00
PHP: 5.2.9 OS: Gentoo Linux Package Version: 1.0.1

Description:
------------
In several tests I've realized that Net_DNS returns not more than seven NAPTR records (haven't checked that for other record types).

Please fix Net_DNS to show all NAPTR records.


Test script:
---------------
&lt;?php
    require_once 'Net/DNS.php';

    $resolver = new Net_DNS_Resolver();
    $resolver-&gt;debug = 1;
    $response = $resolver-&gt;query('4.2.7.8.7.2.2.7.0.0.7.9.4.e164.arpa', 'NAPTR', 'IN');
    if ($response) {
        foreach ($response-&gt;answer as $rr) {
        $rr-&gt;display();
    }
}
?&gt;


Expected result:
----------------
Shows 10 records.

Actual result:
--------------
Shows only 7 results.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_DNS Bug
Reported by renne
2009-06-09T17:48:03+00:00
PHP: 5.2.9 OS: Gentoo Linux Package Version: 1.0.1

Description:
------------
In several tests I've realized that Net_DNS returns not more than seven NAPTR records (haven't checked that for other record types).

Please fix Net_DNS to show all NAPTR records.


Test script:
---------------
&lt;?php
    require_once 'Net/DNS.php';

    $resolver = new Net_DNS_Resolver();
    $resolver-&gt;debug = 1;
    $response = $resolver-&gt;query('4.2.7.8.7.2.2.7.0.0.7.9.4.e164.arpa', 'NAPTR', 'IN');
    if ($response) {
        foreach ($response-&gt;answer as $rr) {
        $rr-&gt;display();
    }
}
?&gt;


Expected result:
----------------
Shows 10 records.

Actual result:
--------------
Shows only 7 results.</pre>]]></description>
      <dc:date>2009-06-09T17:48:03+00:00</dc:date>
      <dc:creator>ml &amp;#x61;&amp;#116; bartschnet &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>Net_DNS Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/15978">
      <title>Net_DNS: Bug 15978 [Assigned] mhash removed in PHP 5.3.0</title>
      <link>http://pear.php.net/bugs/15978</link>
      <content:encoded><![CDATA[<pre>Net_DNS Bug
Reported by jvwag
2009-03-04T14:23:14+00:00
PHP: 5_3 CVS-2009-03-04 OS:  Package Version: 

Description:
------------
      ext/mhash is removed in 5.3.0 while Net_DNS is still dependent. The dependent code is fixed in CVS. This code should be released as stable.




Test script:
---------------
         

Expected result:
----------------
      # pear install Net_DNS
**installing**


Actual result:
--------------
      # pear install Net_DNS
pear/Net_DNS requires PHP extension &quot;mhash&quot;
No valid packages found
install failed</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_DNS Bug
Reported by jvwag
2009-03-04T14:23:14+00:00
PHP: 5_3 CVS-2009-03-04 OS:  Package Version: 

Description:
------------
      ext/mhash is removed in 5.3.0 while Net_DNS is still dependent. The dependent code is fixed in CVS. This code should be released as stable.




Test script:
---------------
         

Expected result:
----------------
      # pear install Net_DNS
**installing**


Actual result:
--------------
      # pear install Net_DNS
pear/Net_DNS requires PHP extension &quot;mhash&quot;
No valid packages found
install failed</pre>]]></description>
      <dc:date>2009-03-22T17:33:10+00:00</dc:date>
      <dc:creator>joffrey &amp;#x61;&amp;#116; ne2000 &amp;#x64;&amp;#111;&amp;#x74; nl</dc:creator>
      <dc:subject>Net_DNS Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14830">
      <title>Net_DNS: Feature/Change Request 14830 [Assigned] Add source port option to resolver</title>
      <link>http://pear.php.net/bugs/14830</link>
      <content:encoded><![CDATA[<pre>Net_DNS Feature/Change Request
Reported by guitarking117
2008-10-19T18:31:17+00:00
PHP: 5.2.6 OS: Suse Linux Package Version: 1.0.0

Description:
------------
With `dig`, the source port for the connection is usually chosen randomly. However, it is possible to specify a source port with the -b option as so:

-b [ip address]#[src port]

Here's a real-life example of how this would work:

-b 206.74.179.17#1024

This is useful as sometimes it is necessary to chose specific port numbers to do certain types of diagnostics. It would be nice of Net_DNS offered a similar option to specify a source port. Currently I'm using Net_DNS for all my other DNS checks (even my reverse DNS checks), but I'm having to exec() dig to perform tests using a specific source port.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_DNS Feature/Change Request
Reported by guitarking117
2008-10-19T18:31:17+00:00
PHP: 5.2.6 OS: Suse Linux Package Version: 1.0.0

Description:
------------
With `dig`, the source port for the connection is usually chosen randomly. However, it is possible to specify a source port with the -b option as so:

-b [ip address]#[src port]

Here's a real-life example of how this would work:

-b 206.74.179.17#1024

This is useful as sometimes it is necessary to chose specific port numbers to do certain types of diagnostics. It would be nice of Net_DNS offered a similar option to specify a source port. Currently I'm using Net_DNS for all my other DNS checks (even my reverse DNS checks), but I'm having to exec() dig to perform tests using a specific source port.</pre>]]></description>
      <dc:date>2008-10-24T06:44:33+00:00</dc:date>
      <dc:creator>nicholas &amp;#x61;&amp;#116; dnscrawler &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Net_DNS Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/13593">
      <title>Net_DNS: Bug 13593 [Assigned] Net_DNS Not workin on windows</title>
      <link>http://pear.php.net/bugs/13593</link>
      <content:encoded><![CDATA[<pre>Net_DNS Bug
Reported by lostboy669
2008-04-04T12:33:54+00:00
PHP: Irrelevant OS: Windows Package Version: 1.0.0

Description:
------------
I have been traying to get to work Net_DNS on windows for months, finally i figured out myself not to much documentation on this for windows. So i decided to contribute for this, don't know if it's the correct channel.

The problem resides in var $resolv_conf, for windows users this must be set to the absolute path of resolv.conf

Test script:
---------------
&lt;?php
require ('Net/DNS.php');

$resolver = new Net_DNS_Resolver();
$response = $resolver-&gt;query('example.com');
if ($response) {
  foreach ($response-&gt;answer as $rr) {
    $rr-&gt;display();
  }
}
?&gt;

Expected result:
----------------
example.com. 172800 IN A 208.77.188.166 

Actual result:
--------------
Before var $resolv_conf correction

no result

After var $resolv_conf correction

example.com. 172800 IN A 208.77.188.166</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_DNS Bug
Reported by lostboy669
2008-04-04T12:33:54+00:00
PHP: Irrelevant OS: Windows Package Version: 1.0.0

Description:
------------
I have been traying to get to work Net_DNS on windows for months, finally i figured out myself not to much documentation on this for windows. So i decided to contribute for this, don't know if it's the correct channel.

The problem resides in var $resolv_conf, for windows users this must be set to the absolute path of resolv.conf

Test script:
---------------
&lt;?php
require ('Net/DNS.php');

$resolver = new Net_DNS_Resolver();
$response = $resolver-&gt;query('example.com');
if ($response) {
  foreach ($response-&gt;answer as $rr) {
    $rr-&gt;display();
  }
}
?&gt;

Expected result:
----------------
example.com. 172800 IN A 208.77.188.166 

Actual result:
--------------
Before var $resolv_conf correction

no result

After var $resolv_conf correction

example.com. 172800 IN A 208.77.188.166</pre>]]></description>
      <dc:date>2008-05-14T03:10:26+00:00</dc:date>
      <dc:creator>renem &amp;#x61;&amp;#116; zmedia &amp;#x64;&amp;#111;&amp;#x74; com &amp;#x64;&amp;#111;&amp;#x74; mx</dc:creator>
      <dc:subject>Net_DNS Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/11665">
      <title>Net_DNS: Feature/Change Request 11665 [Assigned] LOC RR Type</title>
      <link>http://pear.php.net/bugs/11665</link>
      <content:encoded><![CDATA[<pre>Net_DNS Feature/Change Request
Reported by wnagele
2007-07-22T10:29:32+00:00
PHP: Irrelevant OS:  Package Version: 1.0.0

Description:
------------
It would be nice to have the RR type LOC for GPS data supported.

For more information see: http://en.wikipedia.org/wiki/LOC_record</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_DNS Feature/Change Request
Reported by wnagele
2007-07-22T10:29:32+00:00
PHP: Irrelevant OS:  Package Version: 1.0.0

Description:
------------
It would be nice to have the RR type LOC for GPS data supported.

For more information see: http://en.wikipedia.org/wiki/LOC_record</pre>]]></description>
      <dc:date>2007-11-30T07:52:21+00:00</dc:date>
      <dc:creator>mail &amp;#x61;&amp;#116; wnagele &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Net_DNS Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
