Current time: 05-22-2012, 08:27 AM Hello There, Guest! (LoginRegister)

Post Reply 
XMLRPC Error with Wordpress (SOLUTION)
05-11-2007, 10:57 PM
Post: #1
XMLRPC Error with Wordpress (SOLUTION)
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:

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:

Code:
<?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
Visit this user's website Find all posts by this user
Quote this message in a reply
05-15-2007, 12:50 AM
Post: #2
XMLRPC Error with Wordpress (SOLUTION)
Thank you so much for this. I was so frustrated before I found this. I modified my xmlrpc.php file, and now everything works again.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-31-2008, 04:49 PM
Post: #3
XMLRPC Error with Wordpress (SOLUTION)
So this does not seem to be working for me. Any additional suggestions? Thanks!
Find all posts by this user
Quote this message in a reply
08-31-2008, 06:12 PM
Post: #4
XMLRPC Error with Wordpress (SOLUTION)
Couple of things.

What version of Wordpress are you running?
What version of PHP?

Regards,

blueorder
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: