Forums

getmyuid() and fileowner() disabled (4 posts)

  1. joaociocca
    Member
    Posted 1 year ago #

    when i try to use WP2.5's automatic update plugin feature, it returns me this error, saying that the getmyuid() and fileowner() functions have been disabled on file.php

    what can I do? I already tried to search the net for a solution, but nothing came up!

  2. dd32
    Member
    Posted 1 year ago #

    http://trac.wordpress.org/ticket/6465

    I'll look into it and see if i can find a workaround for it.

    In the meantime, You may edit wp-admin/includes/file.php and change the function get_filesystem_method() to this : (It should be at the bottom of the file)

    function get_filesystem_method() {
    	if ( extension_loaded('ftp') ) return 'ftpext';
    	if ( extension_loaded('sockets') || function_exists('fsockopen') ) return 'ftpsockets'; //Sockets: Socket extension; PHP Mode: FSockopen / fwrite / fread
    	return false;
    }

    So just remove this from the function:

    $tempFile = tempnam(get_temp_dir(), 'WPU');
    
    	if ( getmyuid() == fileowner($tempFile) ) {
    		unlink($tempFile);
    		return 'direct';
    	} else {
    		unlink($tempFile);
    	}

    Hopefully it'll then work for you. Allthough, chances are, it'll run into another security disabled warning furthur down. I'm looking into a work around solution.

  3. joaociocca
    Member
    Posted 1 year ago #

    it actually passed that problem. but didn't work fully for some reason. I tried to update google analytics for wp, here's the output.

    Downloading update from http://downloads.wordpress.org/plugin/google-analytics-for-wordpress.2.5.zip
    
    Unpacking the update
    
    Deactivating the plugin
    
    Removing the old version of the plugin
    
    Installing the latest version
    
    Installation failed

    and actually, it removed the plugin ¬¬ gotta reinstall and reconfigure it now..

  4. greenbocai
    Member
    Posted 1 year ago #

    any update on this? I'm having the exact same problem. thanks!!

Topic Closed

This topic has been closed to new replies.

About this Topic