Katanius Posted June 5, 2007 Share Posted June 5, 2007 I use the command line pear command to install the net_DNS package after i made sure i have all needed dependencies, i get installation successfull message, i copy paste the example from the pear.net documantation of Net_DNS to test if its working, i run the script and it returns nothing... I run scripts localy on my comptuter on a windows platform with an Apatche server. What did i do wrong? plz help me. Quote Link to comment https://forums.phpfreaks.com/topic/54356-net_dns-package-help/ Share on other sites More sharing options...
trq Posted June 5, 2007 Share Posted June 5, 2007 What did i do wrong? please help me. Could be any number of things. Can we see some code? Also, make sure your include_path is set properly. Quote Link to comment https://forums.phpfreaks.com/topic/54356-net_dns-package-help/#findComment-268804 Share on other sites More sharing options...
Katanius Posted June 5, 2007 Author Share Posted June 5, 2007 the code i used is this: <?php require_once 'Net/DNS.php'; $resolver = new Net_DNS_Resolver(); $response = $resolver->query('example.com'); if ($response) { foreach ($response->answer as $rr) { $rr->display(); } } ?> its straight from the documentation example, i also tryied this: <?php // include class file include("Net/DNS.php"); // create object $ndr = new Net_DNS_Resolver(); // uncomment this for debug output // $ndr->debug = 1; // query for IP address $answer = $ndr->search("cnet.com", "A"); // print output print_r($answer); ?> also with no success. this is my include path: ;include_path = "C:\PHP5\PEAR" and this is my php instalation dir: C:\PHP5 the package is installed in: C:\PHP5\PEAR\Net Quote Link to comment https://forums.phpfreaks.com/topic/54356-net_dns-package-help/#findComment-268812 Share on other sites More sharing options...
trq Posted June 5, 2007 Share Posted June 5, 2007 Have you got error_reporting and display_errors enabled? I don't see any problems, though I have no idea what the methods of the Net_DNS_Resolver class actually are. Quote Link to comment https://forums.phpfreaks.com/topic/54356-net_dns-package-help/#findComment-268817 Share on other sites More sharing options...
Katanius Posted June 5, 2007 Author Share Posted June 5, 2007 error_reporting is set to E_ALL and i set display_errors = on in the php.ini but still nothing... is there anything else i should check or something i might have forgoten or done wrong? Quote Link to comment https://forums.phpfreaks.com/topic/54356-net_dns-package-help/#findComment-268828 Share on other sites More sharing options...
trq Posted June 5, 2007 Share Posted June 5, 2007 is there anything else i should check or something i might have forgoten or done wrong? Hard to tell.. Ive never used said class. But require_once() will generate errors if it doesn't work, and calling invalid methods also. Quote Link to comment https://forums.phpfreaks.com/topic/54356-net_dns-package-help/#findComment-268831 Share on other sites More sharing options...
Katanius Posted June 6, 2007 Author Share Posted June 6, 2007 I changed the code to this enabeling debug output: <?php // include class file require_once("Net\DNS.php"); // create object $ndr = new Net_DNS_Resolver(); echo $ndr; // uncomment this for debug output $ndr->debug = 1; echo $ndr; // query for IP address $answer = $ndr->search("google.com", "MX"); echo $ndr; // print output print_r($answer); ?> and got this output: Object id #1Object id #1;; search(google.com, MX, IN) ;; query(google.com, MX, IN) ;; using simple sockets Object id #1 What does this mean? does it mean the package works and im doing something wrong or it doent work an just outputs something? I just cant seem to get it to work... and i really need it to work! do you know of anywhare i can get some help with this cause the documentation doesnt help much... Quote Link to comment https://forums.phpfreaks.com/topic/54356-net_dns-package-help/#findComment-269070 Share on other sites More sharing options...
Katanius Posted June 8, 2007 Author Share Posted June 8, 2007 I also get the following errors: Notice: Trying to get property of non-object in C:\Program Files\Apache Group\Apache2\htdocs\dns\dnsdig.php on line 9 Notice: Trying to get property of non-object in C:\Program Files\Apache Group\Apache2\htdocs\dns\dnsdig.php on line 9 I also get this from another script using the same package: Fatal error: Call to a member function display() on a non-object in C:\Program Files\Apache Group\Apache2\htdocs\dns\dnsspec.php on line 13 Quote Link to comment https://forums.phpfreaks.com/topic/54356-net_dns-package-help/#findComment-270436 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.