Monday, April 13, 2009

Timesaver: PHP and SSH2 (libssh2) - Installing or Upgrading

To install or upgrade PHP (5.x) with recent versions of libssh2 (now 1.1) from source (rather than through PECL):
  • Make sure you have OpenSSL (0.9.8g or more recent) installed
  • Download libssh2 from
  • Extract and run ./configure with your choice of arguments: examples: --with-libssl-prefix=/usr/local/ssl --with-openssl
  • Make and install libssh2
  • Download the libssh2 language bindings (now 0.11.0 )for PHP from
  • Extract. In the root directory of the extracted folder, type phpize (or full path if you have more than one php install)
  • Then the familiar: ./configure && make
  • Copy the modules/ file to your PHP extensions directory

No comments: