Go Back   Cloud Computing > Support > Tutorials and Documentation
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 05-24-11, 00:03
BOD Member
 
Join Date: Jun 2010
Posts: 175
Default XML-RPC server accepts POST requests only.

XML-RPC server accepts POST requests only.


The mod_security rule on the servers denies requests to the xmlrpc.php module as this restriction is in place as an additional security measure. And the reason for this is that the xmlrpc.php is a common target that the hackers use to scan for outdated and flawed versions of the XMLRPC module.
mod_security includes some rules to manage some xml_rpc bugs which is usually not associated to wordpress but this rule definitely affect the wordpress users rpc interoperability usage because when some users try to use this feature mod_security abort with 406 error.

1) Enabled HTTP_RAW_POST_DATA from php.ini

always_populate_raw_post_data = On


2) We can solve this by disabling mod_security for the domain containing the wordpress using .htaccess directives.
To disable this specific XMLRPC-related rule, add the following lines in your .htaccess file:

<IfModule mod_security.c>
SecFilterRemove 114
</IfModule>


3) If this does not work you can try adding any one of the following code to the top of your XMLRPC gateway file
if (phpversion()=="5.2.2") $GLOBALS['HTTP_RAW_POST_DATA'] =
file_get_contents("php://input");
OR
if (!isset($HTTP_RAW_POST_DATA)){
$HTTP_RAW_POST_DATA = file_get_contents('php://input');
}
OR
$HTTP_RAW_POST_DATA = file_get_contents(“php://input”);
__________________
Carol.P
Reply With Quote
  #2 (permalink)  
Old 05-24-11, 03:05
BOD Member
 
Join Date: Apr 2011
Posts: 67
Default

Hi

Let me know whether you block xmlrpc by default or not? If yes, then suppose I wan to change setting, do I need to open a request ticket for that. And the above steps you mentioned are compatible with 403 forbidden error?
Reply With Quote
  #3 (permalink)  
Old 05-24-11, 04:20
BOD Member
 
Join Date: May 2010
Posts: 18
Default

By default XML-PRC is enabled on our shared server so you need not to create support ticket for the installation of same module. If you wish to use it on your own VPS or Dedicated server then you can simply install it by re-compiling apache. Again it is compatible with 403 forbidden error as well.
Reply With Quote
  #4 (permalink)  
Old 05-24-11, 06:16
BOD Member
 
Join Date: Apr 2011
Posts: 67
Default

Quote:
Originally Posted by Diana View Post
By default XML-PRC is enabled on our shared server so you need not to create support ticket for the installation of same module. If you wish to use it on your own VPS or Dedicated server then you can simply install it by re-compiling apache. Again it is compatible with 403 forbidden error as well.

I drank some boiling water because I wanted to win singing competition and after boring competition my brain was quite damaged and I forget how to re-compile Apache to install XML-RPC? Can you help me?

Reply With Quote
  #5 (permalink)  
Old 05-24-11, 22:23
BOD Member
 
Join Date: May 2010
Posts: 18
Default

You can compile apache on your linux cpanel server by using easyapache script.
[root@server~]#/scripts/easyapache

Moreover if you are new to the linux shell commands you can recomplie apache via WHM from the following path :
Main >> Software >> EasyApache (Apache Update)
Then start customizing based on profile. Keep apache and PHP default setting as it is then click on "Exhaustive Option List" make sure you have checked XML-RPC then click build. It will take few minutes to complete the easyapache process.
Make a file on your site called phpinfo.php and inside it put this:
Quote:
<?
phpinfo();
?>
I would like to recommend you to build recompile apache with the help of linux expertise.
Reply With Quote
  #6 (permalink)  
Old 05-25-11, 06:11
BOD Member
 
Join Date: Apr 2011
Posts: 67
Default

I would like to ask you one more question. I have a WP blog where registered users can post their articles as a guest. I am using plug-in “WP-sticky” so the later posts always be added right below to the sticky posts.

Also I use XML-RPC protocol and when I ticked XML-RPC in the write for setting in WP, then the WP-sticky doesn't work anymore. And all the new posts added at the top of the sticky posts. Is there any way to use sticky properly with XML-RPC?
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 23:48.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.