I ran into the issue with php.h missing.
The path for this system is set with
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
export MAMP_PHP=/Applications/MAMP/bin/php/php5.5.10/bin
export PATH=”$MAMP_PHP:$PATH”
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
- Run
./configure
to 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:
ssh2
SSH2 support | enabled |
---|---|
extension version | 0.12 |
libssh2 version | 1.4.3 |
banner | SSH-2.0-libssh2_1.4.3 |
Additional reading: