XML-RPC and PHP 5.2.2 (3 posts)

  1. haavi
    Posted 9 years ago #

    After having upgraded the server I'm using for my WordPress blog with PHP 5.2.2 it seems that I'm now unable to make any posts using the metaWeblog API. It is working perfectly fine when I use PHP 5.2.1. though so it can't possibly be my WordPress installation that is the cause of this. (I'm using version 2.1.3)

    Is anyone else on this forum having this problem as well?

  2. kelson
    Posted 9 years ago #

    This is almost certainly the same problem I had here. It turns out there's a bug in PHP 5.2.2 with the feature WordPress uses to run XMLRPC -- which is how all the APIs work.

    In theory, it will be fixed in the next PHP version. For now, I found that you can work around the problem by adding the following line at the beginning of WordPress' xmlrpc.php:

    $HTTP_RAW_POST_DATA = file_get_contents("php://input");

    Put it right before the first line that mentions $HTTP_RAW_POST_DATA, and it should do the trick.

  3. haavi
    Posted 9 years ago #

    That did the trick indeed. Thanks alot for helping me Kelson!

Topic Closed

This topic has been closed to new replies.

About this Topic