• Resolved ofirb

    (@ofirb)


    I’m an noob @ WP, and I ran through many problems, one after another, until I managed to get WP to run properly. I was reading forums for several days, solving problem after problem, so I want to recap everything I’v done and tell what helped me solve the problem.

    After installing wordpress 3.1.1 by uploading it through FTP, setting up the database server, WP worked but I could not add a theme or a plugin through the WP API, and even more annoying, I wasn’t able to update WP itself. You got a screen says – “An Unexpected HTTP Error occurred during the API request“.
    That because of 2 PHP Sevices in Byethost that need to be blocked.
    I discovered at:
    https://www.ads-software.com/support/topic/an-unexpected-http-error-occurred-during-the-api-request-on-wordpress-3/page/2?replies=37
    a plugin named Core Control, that can be found at:
    https://www.ads-software.com/extend/plugins/core-control/
    After downloading it, uploading it to the WP plugin directory and activating it, you’ll have a new option @ the tools menu (@ the API). Inside that page, you’ll need to check the box for “HTTP Access Module X.X“. Then press the button “Save Module Choices“. Then on top of the page you’ll see 2 otions: “main Page” and “HTTP Access Module 1.0“. Press on the 2nd option, of course. Inside the new page you should disable “PHP Streams” and “PHP fopen“.
    After all of that, you may still get the HTTP API error from time to time, but if you’ll refresh the page’ it should work again (This problen I’ll solve at the end).
    But that’s not the end yet. Once one problem is solved, the other awaits. Now if you’ll try to upload something through the API, it will ask the details for my FTP server, try to upload, adn fail eventually. It will say – “Unable to locate WordPress Content directory (wp-content)“.
    So I went back to google to ask for advice, and I ran into that:
    https://www.ads-software.com/support/topic/unable-to-locate-wordpress-content-directory-wp-content?replies=15
    And thank’s to a user named mcarretero I know that if you’ll edit the wp-config.php file, and add in the end of it the next lines:
    if(is_admin()) {
    add_filter(‘filesystem_method’, create_function(‘$a’, ‘return “direct”;’ ));
    define( ‘FS_CHMOD_DIR’, 0751 );
    }
    the problem will be completely solved. Don’t ask me what it does because I have no clue.

    Now, about that annoying HTTP API error that comes by every now and then, you should edit /wp-includes/class-http.php. find the line:
    ‘timeout’ => apply_filters( ‘http_request_timeout’, 5),
    Change the value 5 to something bigger like 30 or 50.
    note: this will not work with some plugins like Akismet or BoddyPress. In that case you’ll have to find where is the timeout limit and change it yourself.

    That is all, I hope it helped.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Solving uploading and updating through WordPress API @ Byethost.com’ is closed to new replies.