WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] An Unexpected HTTP Error occurred during the API request on WordPress 3 (48 posts)

  1. krstep
    Member
    Posted 3 years ago #

    I understand this can be solved following this guide.
    http://www.clickonf5.org/wordpress/solved-an-unexpected-http-error-wordpress/5802

    But the line

    'timeout' => apply_filters( 'http_request_timeout', 5),

    Doesn't exist in the http.php file on WordPress 3.0-RC3.
    Please help me resolve this. Thanks.

  2. stevemg7
    Member
    Posted 3 years ago #

    If you find a way to fix this, I would love to know-I am having the same problem and cannot find that line in my http.php file.

  3. luckyjo
    Member
    Posted 3 years ago #

    I've same problem here. Can anybody give the solustion?

  4. stevenjev
    Member
    Posted 3 years ago #

    Yep, I do too.. Would be really helpful if this was solved.

  5. krstep
    Member
    Posted 3 years ago #

    Why is this in the Alpha/Beta forum?
    It's happening in 3.0 final too.

  6. Kannan Sanjeevan
    Member
    Posted 3 years ago #

    Go to wp-includes and edit class-http.php

  7. c.bavota
    Member
    Posted 3 years ago #

    I just noticed this issue on one of my sites. I have multiple WP sites hosted on a Media Temple (dv) server but only sites in one subdomain seem to have this issue. I removed all plugins, deleted all cache files, attempted to change the .htaccess file, modified the timeout setting in class-http.php but nothing worked.

    Any other suggestions?

  8. c.bavota
    Member
    Posted 3 years ago #

    What's weird is that the images will actually be uploaded if I use the media uploader but I still get the http error and when I try to use the_post_thumbnail('thumbnail') it always displays the full image, though the thumbnails exist.

  9. c.bavota
    Member
    Posted 3 years ago #

    Figured it out. Ended up being something in my theme. I switched back to TwentyTen and things worked perfectly. Went in and modified some admin functions in my theme and that seemed to fix it.

  10. mixmastermichael
    Member
    Posted 3 years ago #

    I'm having this same problem for some reason.

    I've uploaded the most recent version of wp 3.0.2 and modified the
    'timeout' => apply_filters( 'http_request_timeout', 30), in the class-http.php file but I'm still getting that error message.

    Could it have something to do with the server?? I'm using 000webhost right now which can be sort of wonky at times.

  11. Atif Siddiqui
    Member
    Posted 3 years ago #

    I'm having the same problem. Tried everything, can't switch theme at this point in time as I have several modifications. This shouldn't be theme specific, there has to be some legitimate solution.

  12. Actually it very easily can be theme specific. Remember, adding something into your functions.php can be the same as a plugin. Which is why standard debugging routine is:

    1) Turn off the plugins
    2) Switch to 2010

  13. Atif Siddiqui
    Member
    Posted 3 years ago #

    Sorry i didn't get you. What is switching to 2010? Is it kind of wordpress version or something?

  14. 2010 (TwentyTen) is the default theme that ships with WordPress.

  15. Atif Siddiqui
    Member
    Posted 3 years ago #

    oh, well as i've much much updates on my blog so i guess turning back to twentyten wouldn't be a good idea for me. But, i'm pretty sure i havn't disturbed any code that could make that API error.

    I was just wondering if you may have any other solution?

  16. Not if you're not willing to do basic debugging, no :)

    Sorry man, but there are SO many possibilities, it's a waste of everyone's time to make gross, untested, assumptions. Yes, it's a pain in the ass and it's work. Welcome to webmastering.

  17. Atif Siddiqui
    Member
    Posted 3 years ago #

    well, that describes much about that. Thanks a million, gonna try that and will post back results.

  18. Atif Siddiqui
    Member
    Posted 3 years ago #

    well, here i am, back again, the problem resolved by removing everything and installing wordpress on server back again. and it was working find untill yesterday, and all of a sudden, when i did nothing, I MEAN, I DID NOTHING, no installation, no theme change, no nothing, and all of a sudden it started to come again !

    An Unexpected HTTP Error occurred during the API request.

    Try again

    i'm absolutely fed up with this. can't withstand it anymore. is there a proper fix. i mean actual fix, any debugging mode i can get into.

    please help, or tell me someother blogging platform than WORDPRESS.

  19. Dion Hulse
    WordPress Dev
    Posted 3 years ago #

    Download and install the plugin 'Core Control': http://wordpress.org/extend/plugins/core-control/

    Head to it's menu under Tools, Select the HTTP Access module, Save the page.
    Head over to the new HTTP tab along the top of the page.

    What transports is it using? Does it make a difference if you disable the currently active transport?

  20. Atif Siddiqui
    Member
    Posted 3 years ago #

    here the snap:

    Transport Status Actions
    PHP HTTP Extension Not Available
    cURL Available Disable Transport | Test Transport Primary GET
    Primary POST
    Primary GET(non-blocking)
    Primary POST(non-blocking)

    PHP Streams Available Disable Transport | Test Transport
    PHP fopen() Available Disable Transport | Test Transport
    PHP fsockopen() Available Disable Transport | Test Transport

    which transport should i disable?

  21. Atif Siddiqui
    Member
    Posted 3 years ago #

    it says on test transport for cURL

    An Error has occured: name lookup timed out

  22. Dion Hulse
    WordPress Dev
    Posted 3 years ago #

    As the cURL transport is the currently active one, Disable that

    (It's in order of priorities, If cURL is not available, it'll switch to using PHP Streams, But ig the PHP HTTP Extension became available, it'd use that instead)

    "name lookup timed out" is a common-ish problem with curl installations, if something goes wrong, it'll be that in most scenario's.

    Disable the cURL transport and see how you go :)

  23. Atif Siddiqui
    Member
    Posted 3 years ago #

    Thanks Dion, u're a life saver. that really worked. I hope / wish someting else won't start messing now :)

    thanks a million, Dion. That was really helpful.

  24. Dion Hulse
    WordPress Dev
    Posted 3 years ago #

    No problem atifsiddiqui, I'm glad to hear it's worked.

  25. boudewijnvl
    Member
    Posted 3 years ago #

    Thanks Dion, Had the same problem and it is solved!!!

    great

  26. mixmastermichael
    Member
    Posted 3 years ago #

    Blah, tried these steps, but it's not working.

    These are what's displayed next to the following:

    PHP HTTP Extension Not Available
    cURL Not Available

    When I try "test transport" I get an error message:

    An Error has occured: Could not open handle for fopen() to http://tools.dd32.id.au/wordpress/core-control.php

    Which in lies the problem I'm having, I can't seem to connect to ANYTHING on the wordpress server to download (themes, plugins, upgrading wordpress) I once downloaded and installed the "third party host fix" plugin which seemed to have worked to solve this issue of connecting, but it's now acting up again.

    Lil help??

  27. Dion Hulse
    WordPress Dev
    Posted 3 years ago #

    These are what's displayed next to the following:

    What do the Streams, fopen, and fsockopen lines read?

    From what I can assume, You're using the fopen transport? (ie. Core Control says "Primary Get..." beside it?

    Try disabling the fopen transport by clicking "Disable Transport" beside it, It should cause WordPress to use the next available transport (I'm hoping that fsockopen() is marked as available?)

  28. mixmastermichael
    Member
    Posted 3 years ago #

    thanks for the reply Dion,

    so the fopen only read "available", it did not have "primary get.." beside it or anything like that. I've tried disabling it per your instructions. fsockopen() is marked available. Still no luck though.

    The "get..." stuff is next to the PHP Streams where it read:
    Primary GET
    Primary POST
    Primary GET(non-blocking)
    Primary POST(non-blocking)

    So weird. It was working beautifully up until this week. I am starting to think it's my host though, I'm currently using a free host option. Here is my blog in case you might want the URL. http://mixmastermichael.byethost22.com

    Thanks for reading and trying to help. Any thoughts?

  29. mixmastermichael
    Member
    Posted 3 years ago #

    Further note, when I try to upgrade WP I get this error relating to the fopen(), even when it's been disabled.

    Download failed.: Could not open handle for fopen() to http://wordpress.org/wordpress-3.1.zip

  30. Dion Hulse
    WordPress Dev
    Posted 3 years ago #

    Would I be able to get a screenshot of the output of the HTTP Core Control page? You can either post it here or email it to me: [removed email]

Topic Closed

This topic has been closed to new replies.

About this Topic