I ran into the issue with php.h missing.
The path for this system is set with
This ensures PHP from MAMP Pro is being used not the OSX version.
When trying to compile SSH2 php.h is missing which causes fatal error….
Follow these steps, and retry SSH2 compilation as per these steps.
Here’s how I fixed it:
- MAMP doesn’t provide the source code archive for PHP 5.4.10 so download it from php.net
- Extract the source code archive to /Applications/MAMP/bin/php/php5.4.10/include/php
./configureto configure the source code for your platform (without this step the pecl install will fail looking for a bunch of header files)
- Retry compilation for ssh2
If you run phpinfo() you should now get an entry for ssh2 as follows: