WordPress.org

Forums

Fatal error: Cannot redeclare class WP_Http in */class-http.php on line 18 (20 posts)

  1. charlesssss
    Member
    Posted 5 years ago #

    So I get this message, can't access my website.

    At first the problem was that the file was missing, I don't know how since I didn't touch it, so I downloaded wordpress and put the file back in.

    EDIT: It's in the wp-includes folder

  2. sushimustwrite
    Member
    Posted 5 years ago #

    I'm having the same problem, except on line 38. This line happens to be:

    class WP_Http {

  3. Austin Matzko
    Member
    Posted 5 years ago #

    Probably a plugin is including this file twice and thereby causing the error. Try these instructions to disable all of your plugins, and then you can re-activate them one-by-one to discover the culprit.

  4. mtrachta
    Member
    Posted 5 years ago #

    I have the same issue:

    Fatal error: Cannot redeclare class wp_http in /xxxxxx/wp-includes/class-http.php on line 38

    This error is returned while trying to display pages and for administation pages as well.
    I've tryied mentioned hint with plugins but it did not help :-(

    This error had occured after switch to new WP v3.0 :-(

  5. achshar
    Member
    Posted 5 years ago #

    yes same here i had this error after upgrading to new v.3.0
    any help would be appreciated

  6. steviedonx
    Member
    Posted 5 years ago #

    I have also just had this error after upgrading to 3.0. I disabled all plugins before I updated so it's definitely not that. Any help would be amazing. My error also shows line 38.

  7. gaestudio
    Member
    Posted 5 years ago #

    Same here, line 38, no access to page, no access to admin. :(

  8. texas_smoke69
    Member
    Posted 5 years ago #

    Same exact problem and I have absolutely NO idea how to recover from this. If I would have known this would happened I would never had upgraded to 3.0 Now my webpage won't load and I can't figure out how to log in to fix the problem.

  9. ericadecker
    Member
    Posted 5 years ago #

    I had the same problem, and I fixed it by manually downloading WordPress 3, and then uploading the new version of http.php which is in the folder /wp-includes. The older version defines the class WP_Http (hence the "redeclare"), but the new version does not.

    Hope that helps!

  10. thejlane
    Member
    Posted 5 years ago #

    ericadecker - where was the old one, if not in the wp-includes folder?

  11. ericadecker
    Member
    Posted 5 years ago #

    Both the older and newer versions of http.php are in wp-includes, but the code changed to not define the class WP_Http, since it is defined in the new file class-http.php (which was not included in previous WP installs). So in my case, I updated and got the new class-http.php file, but my http.php file did not update...so I did it manually.

  12. texas_smoke69
    Member
    Posted 5 years ago #

    @ericadecker
    When you say you manually downloaded WordPress 3, I assume you mean on your local machine. I did that. Do I now have to FTP the http.php file to my wp-includes folder on to my host?

    I'm a big time rookie using Word Press so if I sound stupid, it's because I am.

  13. zncjmom
    Member
    Posted 5 years ago #

    Mine wasn't plugins and I directly ftp'd the http.php files to no avail. I went back to an earlier version of WP and it's back up. If anyone figures this out....

  14. ericadecker
    Member
    Posted 5 years ago #

    texas_smoke69, Yes, you should use an FTP host to manually put the updated version of http.php in the wp-includes folder on your server. FileZilla is free and a decent FTP client.

    zncjmom, that should take care of the duplicate declarations, but in my case I had a lot of files that didn't fully update, so I received one "redeclared" or "undeclared" error after another, and manually updated my files until there were no other errors. I read that the WP automatic updates don't always fully work, depending on your plugins and themes.

  15. texas_smoke69
    Member
    Posted 5 years ago #

    zncjmom..... how did you revert back to the earlier version of wordpress? I've manually uploaded all of the files for 3.0 and still can't get my website working.

  16. texas_smoke69
    Member
    Posted 5 years ago #

    I have loaded wordpress 3.0 directly onto the server and I can rebuild my site (I think), but the domain name will change to:
    http://thenewarkchurch.org/wordpress

    I do not want that to happen. It needs to STAY http://thenewarkchurch.org

    I can't get into my original wp-admin or can't figure out how to.

    I wish I understood how Worpress works with the files on the host (Godaddy.com). I'm beginning to think I'll need to completely kill everything on the host and start from scratch.

    I'm obviously way over my head on this.

  17. Guillaume
    Member
    Posted 4 years ago #

    It is working! Thanks to ericadecker !

    I downloaded the .RAR version of WordPress 3.0 on the WebSite. UnZip. Find the http.php in the Wp-Includes files and with FileZilla upload it on my site. ( In the Wp-Includes files. )

    Awesome!

  18. jacinta12
    Member
    Posted 4 years ago #

    ericadecker - i had the same problem (FFatal error: Cannot redeclare class WP_Http in /home/content/16/6890016/html/wp-includes/class-http.php on line 38) on my website http://www.sweetmedia.com.au

    Only i hadn't uploaded to the new wordpress 3, but your advice helped me get back part of my site. I still can't log in and not all the pages work. While I was away on holidays my hosting company deleted my site because I was late paying the bill.

    I paid for a new site and they gave me my old files back. Now I can't get into my wp dashboard to sort things out.

    I tried manually uploading the two files class-http.php and http.php in wp-includes which got rid of the initial fatal error message

    Now I have a new error on the log in page, there is no log in button so I can't actually get past the log in screen. I get this error at the top of the screen:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '__return_zero' was given in /home/content/16/6890016/html/wp-includes/plugin.php on line 166

    and I get this error where the log in button should be just underneath my password:

    Fatal error: Call to undefined function checked() in /home/content/16/6890016/html/wp-login.php on line 599

    Has any body seen any similar forums / posts on how to fix the broken log in button?

  19. RandomTandem
    Member
    Posted 4 years ago #

    Hello, would someone be able to help me with this problem please? I uploaded WordPress Audio Plugin. The plugin doesnt show up unless I put this code in the footer <?php wp_footer(); ?>

    the player works when i put the code in the footer but then I get this error message in the footer. Does anyone know how I can get rid of this fatal error message? Please help! Ive been dealing with this for two days

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 't' was given in

    my site is http://www.randomtandem.com

    but I took that code out of the footer because I dont want that error message on my site.

    thanks in advance for your help :-)

  20. indamarisa
    Member
    Posted 4 years ago #

    This is happening to me as well-Im a complete idiot and don't understand where to find FTP and code etc etc-

    here is the error I am getting:

    Fatal error: Cannot redeclare class WP_Http in /home6/bodystru/public_html/wp-includes/class-http.php on line 38

    any help would be appreciated

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.