i am new to setting php servers, and i had go though other related post, seems like nobody have the same error as i have. I am using MAMP 2.0.2, and running PHP 5.3.6, and I
I had the same problem whilst trying to pecl install -f ssh2
with MAMP.
Here's how I fixed it:
./configure
to configure the source code for your platform (without this step the pecl install will fail looking for a bunch of header files)pecl
install(much thanks to Stephen's answer which is pretty much the same)
PECL Modules are compiled modules, in order to install them, you need the PHP headers. You can found the headers on php.net/downloads.php make sure you download a version which match with your PHP version. Then you can follow this : Installing PHP OAuth in MAMP environment
This is a complement to Stephen's answer and Greg's comment
When compiling xdebug 2.3.2 for php 5.6.2 on OSX 10.10.2, I could not get rid of the
'zend_config.h' file not found
error until I added the following option to ./configure in the php folder:
./configure --without-iconv
Credits to Cameron Browning
I know this is old but I found this question while having a similar issue.
MAMP doesn’t ship with a bunch of the PHP sources
Create directory for your PHP sources:
mkdir -vp /Applications/MAMP/bin/php5/include
Untar php-5.x.x.tar.gz into /Applications/MAMP/bin/php/php5.*/include or /Applications/MAMP/bin/php5/ include:
tar zxvf php-5.x.x.tar.gz -C /Applications/MAMP/bin/php/php5.?.??/include
Rename your php-5.x.x directory to php (without the version numbering):
mv /Applications/MAMP/bin/php/php5.2.17/include/php-5.?.?? /Applications/
MAMP/bin/php/php5.2.17/include/php
Configure PHP sources (it’ll create necessary files i.e. zend_config.h, tsrm_config.h, etc.):
cd /Applications/MAMP/bin/php/php5.?.??/include/php
./configure
The process was for another fix but this resolved the issues with php.h not being found
Credit to where I found the answers - :
Thomas Hunter Blog
Google Doc detailing process