SSH2 on Zend Server CE (OSX Snow Leopard)
So you need SSH2 for your local Exchange instance. That's easy, right?! Oh, so wrong you are! Correction - now it IS easy. Just follow this simple guide. The key here is that Zend is 32-bit and MacOS on Snow Leopard is 64-bit. We need to always use the 32-bit versions.
Download the two tarballs attached to this page (libssh2-1.4.1.tar.gz and sh2-0.11.2.tgz). Place them in a local directory, let's call it "ssh2"
cd into your new ssh2 directory and decompress both files (tar -zxvf ssh2-0.11.2.tgz)
You should see 2 new directories.
First libssh2:
cd into the libssh2 directory
./configure CFLAGS="-arch i386"
sudo make install
This should be successful - you should see the new files in /usr/local/lib (ls -l /usr/local/lib/*ssh2*)
Now ssh2:
cd into the ssh2 directory
/usr/local/zend/bin/phpize
./configure --with-ssh2=/usr/local/lib --with-php-config=/usr/local/zend/bin/php-config CFLAGS="-arch i386"
make
sudo make install
You should now have in ssh2.so in /usr/local/zend/lib/php_extensions
Test it:
file /usr/local/zend/lib/php_extensions/ssh2.soÂ
You should see:
/usr/local/zend/lib/php_extensions/ssh2.so: Mach-O bundle i386
Add the extension via your Zend Server console and restart Php/Apache (for me, it's: http://localhost:10081/ZendServer/Login)
To test, you can download the file "test_ssh2.php". Be sure to test it with the Zend version of PHP:
/usr/local/zend/bin/php test_ssh2.php
Enjoy the Glory of SUCCESS!














