Skip to content

Instantly share code, notes, and snippets.

@arsonus
Forked from magnetikonline/README.md
Created October 17, 2016 20:20
Show Gist options
  • Select an option

  • Save arsonus/f432052174586546680b0f610423707a to your computer and use it in GitHub Desktop.

Select an option

Save arsonus/f432052174586546680b0f610423707a to your computer and use it in GitHub Desktop.
Compile ssh2 bindings extension for PHP7.

Compile ssh2 bindings extension for PHP7

The current PHP ssh2 extension via PECL won't compile under PHP7.

Using a more recent version via PHP's GitHub we can make this work.

$ sudo apt-get install autoconf libssh2-1-dev
$ curl -LO https://github.com/php/pecl-networking-ssh2/archive/master.zip
$ unzip master.zip
$ cd pecl-networking-ssh2-master
$ phpize
$ ./configure
$ make

Extension will be available for use at ./modules/ssh2.so.

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment