WordPress.org

Ready to get started?Download WordPress

Forums

Fatal Error during update to 3.6 (undefined function) (17 posts)

  1. Ward5x5
    Member
    Posted 11 months ago #

    I updated several sites to 3.6 today and one of them is giving me issues. After pressing the Update button inside the Dashboard it starts to download 3.6 and then spits out the following error:

    Fatal error: Call to undefined function wp_safe_remote_get() in /usr/home/romein/domains/buurtcentrumderomein.nl/public_html/darts/wp-admin/includes/file.php on line 500

    I checked file.php and like 500 is the following:

    $response = wp_safe_remote_get( $url, array( 'timeout' => $timeout, 'stream' => true, 'filename' => $tmpfname ) );

    I have several wordpress installs on this server and this is the only one that is giving me issues. The site which works fine as it but won't update is http://darts.buurtcentrumderomein.nl

    Could anyone tell me what this error means. Is it perhaps possible that is has something to do with file permissions, since I had to tinker with them on this install in the past. If so is there an easy way to check if and what is wrong with the permissions?

  2. Tara
    Member
    Posted 11 months ago #

  3. Alison Kirkconnell
    Member
    Posted 11 months ago #

    I'm having this exact issue. I know it's a permissions issue but don't want to allow the world write ability. How to fix it?

  4. Ward5x5
    Member
    Posted 11 months ago #

    I tried setting everything as 777 but that just breaks a lot more than it fixes. Is there a list somewhere of exactly what files need what permissions? I went through the troubleshoot guide but none of related to file permissions.

  5. Alison Kirkconnell
    Member
    Posted 11 months ago #

    I tried that too. It's frustrating. I'll look into which files need which permissions. It has to be out there somewhere.

  6. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

  7. steevithak
    Member
    Posted 11 months ago #

    I'm getting this error too when trying to update one of my WP blogs. All past updates have gone well with no errors, so this seems to a new problem in v3.6.

    Fatal error: Call to undefined function wp_safe_remote_get() in [...]/wp-admin/includes/file.php on line 500

  8. esmi
    Forum Moderator
    Posted 11 months ago #

    Try:
    - switching to the default theme by renaming your current theme's folder inside wp-content/themes and adding "-old" to the end of the folder name using FTP or whatever file management application your host provides.

    - resetting the plugins folder by FTP or phpMyAdmin.

    - re-uploading all files & folders - except the wp-content folder - from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

    - running the upgrade manually via wp-admin/upgrade.php

  9. steevithak
    Member
    Posted 11 months ago #

    Looks like the update may have died half-way through. The admin side of the site was completely unusable, nearly everything produced error messages. Couldn't turn off plugins, change themes, etc.

    So I did a manual update. Downloaded the 3.6 tar.gz file, and overwrote all the files. Seems good as new now.

    Really weird though, I run dozens of wordpress sites and have never seen one do something like that before during an upgrade.

    I've now done the 3.6 update on several more sites and did not hit similar errors.

  10. pumka
    Member
    Posted 11 months ago #

    I simply edited the file replacing wp_safe_remote_get to wp_remote_get at the line 500 and that allowed me to run the update.

  11. Anton
    Member
    Posted 11 months ago #

    Thanks pumka, that dit it for me too.

  12. rachellucie
    Member
    Posted 11 months ago #

    Hi pumka,

    Can you explain how I find that file using ftp? I am not sure how to do this. I am getting the exact same error.

    thanks

  13. pumka
    Member
    Posted 10 months ago #

    The path is wp-admin/includes/file.php relative to your WP installation folder.
    Hope that helps.

  14. PlanoNome
    Member
    Posted 10 months ago #

    I too been having problems with V3.6. Only thing is, after updating it, both backend an frontend of the site goes blank! I cant edit anything whatsoever. I took Pumka's advice and renamed wp_safe_remote_get to wp_remote_get at the line 500 and the site is still blank. Thankfully my client understands that the internet isn't perfect, but I need this resolved asap. Any more suggestions as to what to do?? Thanks. The link to the site is http://www.beautifulpeoplemas.com/

  15. pesikov
    Member
    Posted 9 months ago #

  16. PaulJHopkinson
    Member
    Posted 8 months ago #

    Thanks Denis / Pesikov! Altering wp-includes/ http.php with the code

    function wp_safe_remote_get( $url, $args = array() ) {
    	$args['reject_unsafe_urls'] = true;
    	$http = _wp_http_get_object();
    	return $http->get( $url, $args );
    }

    did the trick! =)

  17. Scriptrunner (Doug Sparling)
    Member
    Posted 8 months ago #

    wp_safe_remote_get has been in WordPress since 3.6, so I don't know why that blog article suggested it was only in a beta version of 3.7. My guess is you were downloading from a pre-3.6 version of WordPress and the update didn't complete. If there was no wp_safe_remote_get in your wp-includes/http.php file, then you might want to consider a fresh install or update. You should never have to modify a core file to make an update. If wp_safe_remote_get is not there, then you're not running 3.6/3.6.1, at least not in its entirety.

Reply

You must log in to post.

About this Topic