Foliovision Logo

XML-RPC server accepts POST requests only - WordPress Error

May 19th, 2007

Lost an hour today to trying to debug Ecto posting to this weblog (if you're not using Ecto, you should consider it).

I was constantly getting this error:

XML-RPC server accepts POST requests only

Finally I wrote up a nice little support ticket for Dreamhost with all the details. Surprisingly I got the fix back in relatively short order.

I was wondering what the problem with WordPress was. It turned out to be a PHP 5.2.2 bug. The file xmlrpc.php is broken under PHP 5.2.2. As WordPress is the weblog system in widest use in the entire world, it would be nice if the PHP team would get with the real world and debug their releases before rolling them out.

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:


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.

I made this fix and now Ecto works a charm again. Alas, this isn't the first time a PHP error has brough XMLRPC/Ecto down on WordPress weblogs.

A number of things went wrong here:

  1. the PHP developers dropped the ball on their debugging
  2. Dreamhost dropped the ball rolling out 5.2.2 with such a bug in it
  3. Dreamhost dropped the ball a final time by not proactively notifying all its customers who are running WordPress weblogs about this bug

I've made this post as I was unable to find any useful information about the XML-RPC serve accepts POST requests only bug when searching Google for that phrase plus WordPress and plus Ecto. I hope other unfortunates find this post more quickly than I found the solution.


Tags: none

WordPress | Comments | Trackback

del.icio.us Digg Ma.gnolia StumbleUpon Technorati Jump to the top of this page

 

8 comments on “XML-RPC server accepts POST requests only - WordPress Error”

  1. 01

    http://wordpress.org/support/topic/117421

    Google “XML-RPC server accepts POST requests only” wordpress

    Sometimes being too specific is the wrong direction.

    Jason. at May 20th, 2007 around 12:00 am
    Jump to the top of this page
  2. 02

    Thank you for posting this - it worked for me too!

    Emily at May 21st, 2007 around 10:01 am
    Jump to the top of this page
  3. 03

    Thanks, this works for me :)

    Paranoid Android at May 30th, 2007 around 4:17 pm
    Jump to the top of this page
  4. 04

    Also me, thanks!

    Peter Cooper at May 30th, 2007 around 5:50 pm
    Jump to the top of this page
  5. 05

    Wow you have saved me such a head ache..

    Ristac at May 31st, 2007 around 4:35 am
    Jump to the top of this page
  6. 06

    Thanks! Tengo la solucian ahora!

    Fabian at June 1st, 2007 around 7:52 pm
    Jump to the top of this page
  7. 07

    Thanks for your post. It fixed the problem and I’m able to use ecto again.

    Jen at June 7th, 2007 around 4:06 am
    Jump to the top of this page
  8. 08

    […] Wordpress XMLPRC broken in PHP 5.2.2 If you’re wondering why my regular linkdump posts have been absent, it’s because my hosts upgraded PHP without noticing that the upgrade breaks the bit of the Wordpress that allows the auto-post from del.icio.us. Here’s the fix I’ve found and used. (tags: php wordpress del.icio.us) […]

    Links For Thursday 14th June 2007 at Digitalia at June 14th, 2007 around 11:20 am
    Jump to the top of this page

Leave a Reply

  •  
  •  
  •  

You can keep track of new comments to this post with the comments feed.

Recent Posts

Recent Comments: