my local XML-RPC server is playing up.
The IXR things was proving hard to debug as a) I was making it up as I went along b) There was no real output c) I was still getting the problem with connecting to localhost
I fixed c) by a sneaky addition of a local.bealers.com zone that resolves to the internal IP (/etc/hosts didn’t work) and I’ve just hardcoded the host in the relevant place.
b) The wp-keitaimail.php code has been - i think - ported to use IXR now. However lack of output was more of an issue - you’ve probably figured out by now that a) will never get solved - so I decided to work locally and create a test script there connecting to the WP xmlrpc server with the simplest method, metaWeblog.getPost.
< ?php
/**
* situated in ROOT/bin
*/
ob_start();
/**
* i am situated in bin on the same level as WP_ROOT (htdocs)
*/
require_once("../htdocs/wp-includes/class-IXR.php");
/**
* create a new client object (a handle for our remote query)
*/
$client = new IXR_Client("taipan.bealers","/B/Bealers.com/codebase/htdocs/xmlrpc.php");
$msg = new IXR_Message('metaWeblog.getPost');
// Run a query
if (!$client->query($msg,$params))
{
die($client->getErrorMessage() . “(” . $client->getErrorCode() . “)”);
}
$stuff = ob_get_contents();
print_r($client->getResponse());
?>>
Output is not all that helpful:
POST /B/Bealers.com/codebase/htdocs/xmlrpc.php HTTP/1.0
Host: taipan.bealers
Content-Type: text/xml
User-Agent: The Incutio XML-RPC PHP Library
Content-length: 273
< ?xml version="1.0"?>
< ?xml version="1.0"?>
server error. requested method Object does not exist.(-32601)>>
I’m running this locally BTW.
The next thing I tried was to connect to one of the test services that they supply. These come back with mysql errors which actually seemed positive as I was obviously doing the right thing., the issue was at their end.
I’m now thinking that because my local dev env is running from within my home dir (apache user dirs) that apache is not reutrning the right. I think this as when I try to connect to the local xmlprc server I get a 404 message. telnet taipan.bealers 80 comes up with the default document for the server not the defualt doc for *my* sandbox (/home/bealers/sandbox) which is the doc root of http://taipan.bealers.
This is where my focus lies for now.
FFS, why does nothing ever Just Work.








Leave a Reply