Forums

XMLRPC problem

  1. Hi,

    I have been a very happy Wordpress iOS app user for some time but about a month ago it stopped working.
    I wonder if any one can help please, because I have exhausted everything I can think of and found on the web to troubleshoot my issue.

    First, my website is here: http://www.35mmfrog.com
    It is a self hosted website, my host provider is using Apache and the latest version of perl/php.

    When I try to use the iOS app I get an error:
    Sorry, can't log in
    Unable to read the WordPress site on that URL

  2. I uninstalled the app, installed it again, tried to add my blog and it still gives me that error.
    I am using the iOS App v3.3

    I have followed the instructions found there:
    http://ios.wordpress.org/faq/#faq_3

    - My site has XMLRPC enable.
    - When I looked at the source code for the page I could not find however the EditURI tag
    - But I still gives me the right XML file and it still gives me the expected sentence: XML-RPC server accepts POST requests only.

  3. Nonetheless, this was still not working so I tried the following:
    1) Enable extra debug mode as stated here:
    http://dev.ios.wordpress.org/extra-debug/
    Small problem to be aware though... if you have just reinstall the iOS app, unless you have a blog registered you cannot see the settings option!! so I had to create a wordpress hosted blog (as opposed to my selfhosted site 35mmfrog.com), add it to the iOS app and THEN did I get access again to the settings!
    By the way, it also confirms that with the wordpress hosted blog the apps work

    Once I got the extra debug mode on, I used iexplorer to get the wordpress logs on my computer:
    http://www.macroplant.com/iexplorer/

    What I saw in the logs:
    [XML-RPC] ! Expected status code in (200-299), got 404
    [XML-RPC] ! Expected status code in (200-299), got 406

  4. So I tried further fix:
    2) To edit the xmlrpc.php and remove some lines
    As per the thread:
    http://wordpress.org/support/topic/iphone-app-not-connecting/page/2?replies=61
    I just deleted these lines in the xmlrpc.php file

    <api name="Movable Type" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('wpurl') ?>/xmlrpc.php" />
    <api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('wpurl') ?>/xmlrpc.php" />
    <api name="Blogger" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('wpurl') ?>/xmlrpc.php" />
    <api name="Atom" blogID="" preferred="false" apiLink="<?php echo apply_filters('atom_service_url', (get_bloginfo('url')."/wp-app.php/service"))?>" />

    I just left the WordPress line.
    It still did not work.

  5. 3) I added the following line into my xmlrpc.php (right after <?php

    header('Content-Type: text/html; charset=utf-8');

    I don't remember where I found that tip but this still did not work.
    4) I changed to permissions on xmlrpc.php, even going as far as changing to 777 (changed back to 644).
    Still no luck...

    5) I have added the following into my theme header.php
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="<?php bloginfo('url'); ?>/xmlrpc.php?rsd" />as explained there.

    It is still not working!

  6. It is still not working!
    and below are the logs I am getting from the wordpress apps:
    2012-12-12 01:20:43 +0000 Sent blogs list (1 blogs)
    2012-12-12 01:20:49 +0000 <WelcomeViewController: 0x1d595560> viewDidLoad
    2012-12-12 01:20:51 +0000 <AddSiteViewController: 0x1e0ca1e0> viewDidLoad
    2012-12-12 01:21:11 +0000 <AddSiteViewController: 0x1e0ca1e0> checkURL http://www.35mmfrog.com
    2012-12-12 01:21:11 +0000 [WordPressApi] < 1. Assume the given url is the home page and XML-RPC sits at /xmlrpc.php
    2012-12-12 01:21:11 +0000 [WordPressApi] < Trying the following URL: http://www.35mmfrog.com/xmlrpc.php
    2012-12-12 01:21:11 +0000 [XML-RPC] > system.listMethods
    2012-12-12 01:21:12 +0000 [XML-RPC] ! Expected status code in (200-299), got 404
    2012-12-12 01:21:12 +0000 [WordPressApi] < 2. Try the given url as an XML-RPC endpoint
    2012-12-12 01:21:12 +0000 [WordPressApi] < Trying the following URL: http://www.35mmfrog.com
    2012-12-12 01:21:12 +0000 [XML-RPC] > system.listMethods
    2012-12-12 01:21:13 +0000 [XML-RPC] ! Expected status code in (200-299), got 406
    2012-12-12 01:21:13 +0000 [WordPressApi] < Expected status code in (200-299), got 406
    2012-12-12 01:21:13 +0000 [WordPressApi] < 3. Fetch the original url and look for the RSD link by using RegExp
    2012-12-12 01:21:14 +0000 [XML-RPC] > system.listMethods
    2012-12-12 01:21:15 +0000 [XML-RPC] ! Expected status code in (200-299), got 404

  7. (below I replace the question mark with (question mark) because otherwise I cannot post on this forum! this is mental! I had to break my long post that way as I couldnt find what was stopping me posting in this forum... I am cursed! ;)

    2012-12-12 01:21:15 +0000 [WordPressApi] < 5. Parse the RSD document at the following URL: http://www.35mmfrog.com/xmlrpc.php (question mark) rsd
    2012-12-12 01:21:16 +0000 [WordPressApi] < Bingo! We found the WordPress XML-RPC element: http://www.35mmfrog.com/xmlrpc.php
    2012-12-12 01:21:16 +0000 [XML-RPC] > system.listMethods
    2012-12-12 01:21:17 +0000 [XML-RPC] ! Expected status code in (200-299), got 404
    2012-12-12 01:21:17 +0000 [WordPressApi] < Expected status code in (200-299), got 404
    2012-12-12 01:21:22 +0000 <WordPressAppDelegate: 0x1e0495e0> applicationWillResignActive:
    2012-12-12 01:21:23 +0000 <WordPressAppDelegate: 0x1e0495e0> applicationDidEnterBackground:

    I can see now that it sees the RSD tag... when I saw that I thought! great!!!
    But then it still gets some errors...

    I am running out of idea! it is a real shame because that app was making blogging from my iOS device a much better experience...

    I have tried with another free iOS app and there is the same problem.
    Anyone can help? please? :)
    B.

  8. I wouldn't edit the xmlrpc.php file at all, that could cause more problems. Have you updated your WordPress install recently? Maybe see if the 3.5 update gets it working again?

  9. Ok, I have restored the original xmlrpc.php but still have the problem.
    I have also upgraded to 3.5 yesterday and it didn't fix the issue...

    Not sure what I can do next!

  10. That 406 error sounds like an issue with the apache configuration. Let me run some tests to see if I find out what's going on

  11. When Content-Type is specified, the server returns a 404. That's almost certainly apache doing something funky. Do you have any security related plugins installed? Can you post a list?

    If no plugins installed:

    Do you have mod_security or something similar? Can you edit the apache configuration or is it managed by your host?

    If you can't configure apache, you should contact with your hosting provider tech support.

    Some sample requests...

    With Content-Type:

    ~/automattic  ᐅ curl -v -o /dev/null -X POST -H 'Content-Type: text/xml' -s http://www.35mmfrog.com/xmlrpc.php
    * About to connect() to www.35mmfrog.com port 80 (#0)
    *   Trying 91.186.0.2...
    * connected
    * Connected to www.35mmfrog.com (91.186.0.2) port 80 (#0)
    > POST /xmlrpc.php HTTP/1.1
    > User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
    > Host: www.35mmfrog.com
    > Accept: */*
    > Content-Type: text/xml
    >
    < HTTP/1.1 404 Not Found
    < Date: Thu, 13 Dec 2012 12:49:18 GMT
    < Server: Apache
    < X-Powered-By: PHP/5.2.17
    < X-Pingback: http://www.35mmfrog.com/xmlrpc.php
    < Expires: Wed, 11 Jan 1984 05:00:00 GMT
    < Cache-Control: no-cache, must-revalidate, max-age=0
    < Pragma: no-cache
    < Set-Cookie: PHPSESSID=015f8c9066d3806a6fbfd3fbfcfdcbc5; path=/
    < Set-Cookie: wassup=OTFkYmQwZjk5NTg4OTQxOGI3OTgyODBhYzQ2NTQ5MGE6OjEzNTU0MDU2NTk6Ojo6ODcuMjIyLjIuOTg6Ojk4LjIuMjIyLjg3LmR5bmFtaWMuamF6enRlbC5lczo6; expires=Thu, 13-Dec-2012 13:39:19 GMT; path=/
    < Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT
    < Transfer-Encoding: chunked
    < Content-Type: text/html; charset=UTF-8
    <
    { [data not shown]
    * Connection #0 to host www.35mmfrog.com left intact
    * Closing connection #0

    Without Content-Type

    $ curl -v -o /dev/null -X POST -s http://www.35mmfrog.com/xmlrpc.php
    * About to connect() to www.35mmfrog.com port 80 (#0)
    *   Trying 91.186.0.2...
    * connected
    * Connected to www.35mmfrog.com (91.186.0.2) port 80 (#0)
    > POST /xmlrpc.php HTTP/1.1
    > User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
    > Host: www.35mmfrog.com
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Date: Thu, 13 Dec 2012 12:49:31 GMT
    < Server: Apache
    < X-Powered-By: PHP/5.2.17
    < Expires: Thu, 19 Nov 1981 08:52:00 GMT
    < Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    < Pragma: no-cache
    < Connection: close
    < Set-Cookie: PHPSESSID=e5ba3e6d9c5d0abd18821fef02a8e4b6; path=/
    < Set-Cookie: wassup=OTFkYmQwZjk5NTg4OTQxOGI3OTgyODBhYzQ2NTQ5MGE6OjEzNTU0MDU2NzI6Ojo6ODcuMjIyLjIuOTg6Ojk4LjIuMjIyLjg3LmR5bmFtaWMuamF6enRlbC5lczo6; expires=Thu, 13-Dec-2012 13:39:32 GMT; path=/
    < Content-Length: 403
    < Content-Type: text/xml; charset=UTF-8
    <
    { [data not shown]
    * Closing connection #0
  12. Hi Jorge,

    Thanks for that!
    Yes Iam running some security plugins but I have tried last night with:
    all plugins disabled and I mean all, not just the security ones.
    I also changed to the theme to the default "twenty twelve" theme.

    I still got the same issue.

    I cannot change the apache configuration, only my host provider can.
    Do you know what I need to ask them to change by any chance?

    Also... could it have anything to do with .htaccess?
    Because I can edit that file though...
    S.

  13. Unless you added custom lines to .htaccess, that shouldn't be it. If plugins are not the issue, there must be something going on with apache.

    You can tell them you're having problems accessing your xmlrpc.php file and direct them to this thread for details

  14. Thanks Jorge, I am going to contact my host provider and see what they can do.
    I can confirm it is not a problem with my wordpress setup because I created a brand new wordpress install with a clean database and tried to connect but failed! with all the default settings...

    By the way, i just checked I cannot find the "remote services" in the settings->writting on that new wordpress install... will check on google as to why it is the case!
    S.

  15. I should have googled my answer before posting!
    http://wordpress.org/extend/plugins/control-xml-rpc-publishing/
    :)

  16. Yeah, XML-RPC is always on now :)

Topic Closed

This topic has been closed to new replies.


About this Topic