XMLRPC Error with Wordpress (SOLUTION)
Posted by: blueorder
Posted on: 2007-05-11 22:57:00
I'm posting this just in case someone else has an problem with this. Let someone else benefit from my digging around.
If you are having problems posting through XMLRPC, the problem resides with PHP. There is a known bug in PHP 5.2.2 where HTTP_RAW_POST_DATA fails to ever be set.
The solution, for now, is to edit the xmlrpc.php file in your Wordpress installation and add the following code:
if (phpversion()=="5.2.2") $GLOBALS['HTTP_RAW_POST_DATA'] =
file_get_contents("php://input");
The beginning of my xmlrpc.php file looks like this:
<?php
define('XMLRPC_REQUEST', true);
// Some browser-embedded clients send cookies. We don't want them.
$_COOKIE = array();
if (phpversion()=="5.2.2") $GLOBALS['HTTP_RAW_POST_DATA'] =
file_get_contents("php://input");
And XMLRPC is now working again.
blueorder