Re: XML-RPC2 Client (Problem Using Code)

From: Date: Wed, 02 Jan 2008 17:03:39 +0000
Subject: Re: XML-RPC2 Client (Problem Using Code)
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28384@lists.php.net to get a copy of this message
On Jan 1, 2008 3:29 PM, Patrick Taylor <kaylum@earthlink.net> wrote: > Hello everyone, happy new year! > > I am trying to use the client logic of XML-RPC2, but find myself > unable to instantiate a client object. > > Here is the test code used: > > <? > require_once 'XML/RPC2/Client.php'; // this was changed from > XML_RPC2 because of an error trying to find the file > $client = > XML_RPC2_Client('http://localhost/~Kaylum/test//<http://localhost/%7EKaylum/test//È > h\\¹sM<ÃŽØ'>html/rpc/', > 'LS_Server.'); > $result = $client->hello('Sergio'); > print($result); > ?> > > The error received in my browser is: > > Fatal error: Call to undefined function xml_rpc2_client() in /Users/ > Kaylum/Sites/test/html/test.php on line 3 > > Can someone assist me with solving this problem? > > Thank you > > Hi Patrick, The only thing that jumps out at me is missing the "new" keyword: $client = *new* XML_RPC2_Client('http://l<http://localhost/%7EKaylum/test//> I was thinking that one of the behavior changes from PHP4 to PHP5 was that constructor usage was different, one case being that "new" was now required. -- CRB

« previous php.pear.general (#28384) next »