tags:

views:

870

answers:

1

Hey folks,

I am attempting to work with XML-RPC via PHP on a GoDaddy server.

This same server is hosting a Wordpress Blog that makes use of XML-RPC and is functioning, though that may be unrelated...

Whenever I attempt to use any functions that are integrated into PHP for use with XML-RPC, I get an error (function list here: http://us3.php.net/manual/en/ref.xmlrpc.php) e.g.:

Fatal error: Class 'xmlrpc_client' not found

Is this because XML-RPC's PHP functions are not enabled on my server? If so, how do I go about enabling those - it would seem I would have to install the XML-RPC library to do so and of course I cannot do that on a shared server. Doesn't Wordpress use the same batch of XML-RPC functions though (it works fine)?

I think I have managed to thoroughly confuse myself. I have zero experience with XML-RPC.

A: 

Hi Chris,

The first point you made regarding the same server hosting a site supporting XML-RPC, is quite odd, as XML-RPC is enabled at compile time. There are no directives to be used in the php.ini file, and you therefore couldn't enable XML-RPC at run time using ini_set(). This would point to either a different server or several PHP instances running on the same server.

Either way you need to have this extension enabled at compile time, which is out of your hands. So you would have to contact somebody at GoDaddy to get this working.

An alternative to that, would be to look at something like Zend_XmlRpc which is well supported and doesn't require the PHP XML-RPC extension to work.

Good luck.

Kieran Hall
I don't follow what you're saying. I've got Wordpress setup on the same server that I am testing XML-RPC functions with. Wordpress's XML-RPC functions work fine. I don't know that Wordpress uses the PHPXMLRPC library, which is where the integrated XML-RPC functions (like the class xmlrpc_client mentioned) exist for PHP, so I don't even know that it is relevant. I can't find enough documentation to make this make sense to me.
Chris Cooper
I'm not a Wordpress user, however, it appears that they have implemented their own XML-RPC library. This makes sense, since the PHP extension isn't enabled by default. If I were you, I'd go and include a library (like the one I suggested) into your project and use that instead. You have little choice in the matter since GoDaddy doesn't have the PHP extension enabled (you can confirm this using the phpinfo() function).
Kieran Hall
Also, I misunderstood your question slightly. I though that by stating "a Wordpress Blog that makes use of XML-RPC and is functioning" - you had confirmed that Wordpress was using the PHP extension.
Kieran Hall
Thanks for the reply. Wordpress uses the IXR XMLRPC library which I have been working to implement.
Chris Cooper