Skip to content

Instantly share code, notes, and snippets.

@quochoangvp
Forked from magnetikonline/README.md
Created May 21, 2018 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quochoangvp/dd0f0f7e8b9c91b42c28c463fc1e755f to your computer and use it in GitHub Desktop.
Save quochoangvp/dd0f0f7e8b9c91b42c28c463fc1e755f 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