Make WordPress Core

Ticket #7690: 7690.4.diff

File 7690.4.diff, 2.2 KB (added by ShaneF, 18 years ago)

added instrcutions to the class file for installation

  • wp-admin/includes/class-wp-filesystem-ssh2.php

     
    99/**
    1010 * WordPress Filesystem Class for implementing SSH2.
    1111 *
     12 * To use this class you must follow these steps for PHP 5.2.6+
     13 *
     14 * @contrib http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/ - Installation Notes
     15 *
     16 * Complie libssh2 (Note: Only 0.14 is officaly working with PHP 5.2.6+ right now.)
     17 *
     18 * cd /usr/src
     19 * wget http://surfnet.dl.sourceforge.net/sourceforge/libssh2/libssh2-0.14.tar.gz
     20 * tar -zxvf libssh2-0.14.tar.gz
     21 * cd libssh2-0.14/
     22 * ./configure
     23 * make all install
     24 *
     25 * Note: No not leave the directory yet!
     26 *
     27 * Enter: pecl install -f ssh2
     28 *
     29 * Copy the ssh.so file it creates to your PHP Module Directory.
     30 * Open up your PHP.INI file and look for where extensions are placed.
     31 * Add in your PHP.ini file: extension=ssh2.so
     32 *
     33 * Restart Apache!
     34 * Check phpinfo() streams to confirm that: ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp  exist.
     35 *
     36 *
    1237 * @since 2.7
    1338 * @package WordPress
    1439 * @subpackage Filesystem
     
    7196                        $this->options['username'] = $opt['username'];
    7297
    7398                if ( empty ($opt['password']) )
    74                         $this->errors->add('empty_password', __('SSH password is required'));
     99                        $this->errors->add('empty_password', __('SSH2 password is required'));
    75100                else
    76101                        $this->options['password'] = $opt['password'];
    77102
     
    103128                        $time_start = time();
    104129            $data = "";
    105130                        while( true ) {
    106                             if( (time()-$time_start) > $this->timeout ){
     131                            if( (time()-$time_start) > $this->timeout ) {
    107132                                $this->errors->add('command', sprintf(__('Connection to the server has timeout after %s seconds.'), $this->timeout));
    108133                                break;
    109134                            }
    110                     while( $buf = fread( $stream, strlen($stream) ) ){
     135                    while( $buf = fread( $stream, strlen($stream) ) ) {
    111136                        $data .= $buf;
    112137                    }
    113138                        }
     
    448473        }
    449474}
    450475
    451 ?>
    452  No newline at end of file
     476?>