Skip to content

A CodeIgniter sFTP Library - Allows communication to a sFTP server via the CodeIgniter framework

Notifications You must be signed in to change notification settings

ipolar/CodeIgniter-sFTP-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

CodeIgniter sFTP Library

A CodeIgniter sFTP Library - Allows communication to a sFTP server via the CodeIgniter framework.

Contributors

Many thanks to;

Jlil

tunelko

AchrafSoltani

lavluda

kjj1

Ian Grice

Requirements

  1. PHP 5+
  2. CodeIgniter for 2.x
  3. ssh2 extension for PHP (which in turn needs libssh2)

Usage

Have a look at application/controllers/sftp_test.php for an example of how to connect to a remote sFTP server, as well as a few demo commands you can run.

libssh2 & ssh2 installation on OSX 10.9

Here's an updated guide to installing this extension on OSX 10.9 (Mavericks).

I'm using the default OSX PHP install (5.4.24) that comes pre-installed. This guide also assumes you're using Homebrew as a package manager, and have wget installed.

This is very similar to the process on this gist.

  1. Install libssh2;

brew install libssh2

  1. Install ssh2;

wget http://pecl.php.net/get/ssh2-0.11.3.tgz

tar -zxvf ssh2-0.11.3.tgz

cd ssh2-0.11.3

phpize

./configure

make

  1. Copy your newly compiled extension (ssh2.so) into your PHP extensions directory.

sudo cp modules/ssh2.so /usr/lib/php/extensions/no-debug-non-zts-20100525

  1. Add the extension to the php.ini. Just add the following text to the php.ini file;

extension=ssh2.so

  1. Restart apache and run php info to see if the extension has been loaded;

php -i | grep ssh2

You should be good to go from here!

The main thing is that libssh2, ssh2 and php are all the same architecture (32 or 64bit).

About

A CodeIgniter sFTP Library - Allows communication to a sFTP server via the CodeIgniter framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages