troubleshooting Question

anyone got a clue how to use net_dns pear?? how do you do it?

Avatar of Johnny
JohnnyFlag for United States of America asked on
PHP
1 Comment1 Solution625 ViewsLast Modified:
im trying to use two different pear net_dns classes and i am stumped on how to use either one i get massive errors with either one

http://www.ypass.net/software/php/Net_DNS/

and

http://pear.php.net/package/Net_DNS/

i have pear installed but im getting errors
ie:

using the second one NET_dns form pear itself i get
An Error Occured!
Error Number: 2048
Error Description: Assigning the return value of new by reference is deprecated
Error In File: C:\home\www\dragon-software.info\Net_DNS\NET\DNS\RR.php
Error On Line: 95
An Error Occured!
Error Number: 2048
Error Description: Assigning the return value of new by reference is deprecated
Error In File: C:\home\www\dragon-software.info\Net_DNS\NET\DNS\RR.php
Error On Line: 113
An Error Occured!
Error Number: 2048
Error Description: Assigning the return value of new by reference is deprecated
Error In File: C:\home\www\dragon-software.info\Net_DNS\NET\DNS\RR.php
Error On Line: 206
An Error Occured!
Error Number: 2048
Error Description: Non-static method Net_DNS_Resolver::nextid() should not be called statically, assuming $this from incompatible context
Error In File: C:\home\www\dragon-software.info\Net_DNS\NET\DNS\Header.php
Error On Line: 169
An Error Occured!
Error Number: 2048
Error Description: Non-static method Net_DNS::opcodesbyval() should not be called statically, assuming $this from incompatible context
Error In File: C:\home\www\dragon-software.info\Net_DNS\NET\DNS\Header.php
Error On Line: 183
there allot more errors but that the first few

then using the other one i get
Fatal error: Cannot re-assign $this in C:\home\www\dragon-software.info\Net_DNS\NET\DNS\RR.php on line 60
the script im using is
<?php

    // version:
$GLOBALS['DEBUG'];
define('DEBUG', True);
//define('DEBUG', False);

if (DEBUG) {
echo "DEBUG is turned on<br>";
}
//include("check_logon.php");
include(".\include\functions.php");
//include(".\include\mysql_connection.php");
//include(".\script_config.php");
if (DEBUG) {
    set_error_handler("my_error_handler");
    echo "error_handler enabled<BR>";
}
       

##-----------------------------------------------##/*
echo "HELLO<BR>";
//require_once("PEAR.php");
require_once("NET/DNS.php");
$res = new Net_DNS_Resolver();
$res->debug = 0;
$answer = $res->search("66.57.24.174");
echo "<BR><HR><BR>";
print_r($answer);


?>
any ideas on how to fix either one???? im lost
thank you in advance for any help or code you may provide
im not locked in using any one of theses im looking on how to get dns info
ASKER CERTIFIED SOLUTION
holy007

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros