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

ID: 18532
Comment by: horde_user
Reported By: test at globis dot net
Summary: Patch: Adding support for IPv6 hosts
Status: Analyzed
Type: Feature/Change Request
Package: Net_DNS
Operating System: Ubuntu
Package Version: 1.0.7
PHP Version: 5.3.6
New Comment:

Works for me thanks!

Tested on Linux Horde Linux XXXXX 2.6.24-29-generic #1 SMP Thu Apr 21
16:30:46 UTC 2011 x86_64 GNU/Linux

Tested using following PHP and editing /etc/resolv.conf to add or delete
name servers with IPv6 transport from Hurricane Electric. Before this
patch, windows were failing to close when sending mail using the Horde
dynamic mailer (which uses PHP Pear) when IPv6 name servers were
configured. Now it's solved.

<?php
ini_set('include_path',ini_get('include_path').':../includes:/var/www/horde/pear/php:');

require_once('Net/DNS.php');
$resolver = new Net_DNS_Resolver();

$resolver->debug = 1; // Turn on debugging output to show the query

$response = $resolver->query('google.com');
if ($response) {
foreach ($response->answer as $rr) {
$rr->display();
}
}
?>


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

[2011-05-13 00:38:13] skion

Sorry, no time for a proper unit test, but something like this would do
maybe?

<?
require_once('Net/DNS.php');

$pear = new Net_DNS_Resolver();
$pear->debug = true;

// literal
$pear->nameservers = array('2001:7b8:3:47:20d:b9ff:fe14:70d4');
var_dump($pear->query("www.sixxs.net", 'A'));

// ipv6 preferred
$pear->nameservers = array('ns.paphosting.net');
var_dump($pear->query("www.sixxs.net", 'A'));
?>

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

[2011-05-12 23:59:45] doconnor

<div id="changeset">
<span class="removed">-Status: Open</span>
<span class="added">+Status: Analyzed</span>
</div>

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

[2011-05-12 23:59:34] doconnor

Hi Pieter, any chance of a small test case covering the new
functionality as well?

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

[2011-05-12 23:19:06] skion

Added #patch bug:18532;patch:resolver-ipv6.diff;revision:1305242346;.

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

[2011-05-12 23:17:52] skion

Description:
------------
The attached patch adds support for querying IPv6-enabled name servers.

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJun 28, '11 at 3:30p
activeJun 28, '11 at 3:30p
posts1
users1
websitepear.php.net

1 user in discussion

Horde_user: 1 post

People

Translate

site design / logo © 2022 Grokbase