#517 [Asn->Csd]: Fatal error: Call to a member function on a non-object in /usr/lib/php/Net/Whoi

From: Date: Mon, 16 Feb 2004 09:10:25 +0000
Subject: #517 [Asn->Csd]: Fatal error: Call to a member function on a non-object in /usr/lib/php/Net/Whoi
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-2558@lists.php.net to get a copy of this message
ID: 517 Updated by: lsmith@php.net Reported By: david dot rech at virusmedia dot de -Status: Assigned +Status: Closed -Bug Type: Net_Whois +Bug Type: Documentation Operating System: Gentoo Linux PHP Version: 4.3.3 Assigned To: svenasse New Comment: This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. should be fixed when the documentation regenerates next sunday Previous Comments: ------------------------------------------------------------------------ [2004-01-23 04:59:13] pminnieur at entwickler dot com Jep, if you create the Net_Whois Object first, and use query() as a method of this Object, it's OK. If you call it staticly, it'll fail. ------------------------------------------------------------------------ [2004-01-14 15:38:01] adam at trachtenberg dot com This is a bug in the documentation, the correct usage of Net_Whois is: require_once "Net/Whois.php"; $server = "whois.denic.de"; $query = "phpcrawler.de"; // get information about // this domain $whois = new Net_Whois; $data = $whois->query($query, $server); echo $data; ------------------------------------------------------------------------ [2004-01-04 08:18:08] david dot rech at virusmedia dot de Description: ------------ There seems to be a bug in Net_Whois. I've just reproduced it on two diferrent machines. Both apache2, one Gentoo Linux und one RedHat 9.0. While trying to execute your example, I've messed up with sice *nice* message: Fatal error: Call to a member function on a non-object in /usr/lib/php/Net/Whois.php on line 131 Something might be wrong with the Net_Whois::_connect(), but is isn't? Just weird. Reproduce code: --------------- <?php require_once "Net/Whois.php"; $server = "whois.denic.de"; $query = "phpcrawler.de"; // get information about // this domain $data = Net_Whois::query($query, $server); echo $data; ?> Expected result: ---------------- Should return an Pear_Error or the reply of the whois server. ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=517&edit=1

« previous php.pear.doc (#2558) next »