2

I need to install a couple of PHP extensions, like memcache and geoip, on MAMP 3.5, for PHP 5.6.10.

What I'm doing is to run phpize:

/Applications/MAMP/bin/php/php5.6.10/bin/phpize

Which outputs:

Configuring for:

PHP Api Version: 20131106

Zend Module Api No: 20131226

Zend Extension Api No: 220131226

Then configure:

/configure --with-php-config=/Applications/MAMP/bin/php/php5.6.10/bin/php-config

And, afterwards, try to build with make. This is where I get this error:

/Applications/MAMP/bin/php/php5.6.10/include/php/Zend/zend.h:51:11: fatal error: 'zend_config.h' file not found

I downloaded the content of the include/php folder from php.net, version 5.6.10 (found here).

I feel I'm closer now to solving this problem, but I'm at loss with this error. What am I doing wrong, so that apparently the freshly downloaded php from php.net is missing files?

Thank you.

1 Answer 1

4

I ended up using pecl instead of manually compiling the extensions.

The headers missing on the make step were I didn't run ./configure on the php folder - I came across this step by chance, really.

Afterwards, all I had to do was run:

sudo /Applications/MAMP/bin/php/php5.6.10/bin/pecl install memcache

And everything was running on wheels.

Before trying pecl, I tried to run make as I was doing on my post, and the extension compiled successfully, but I had versions mismatch between the php and the extension. I had previously tried pecl without success, but I don't really know what changed in my configuration since I last tried.


Anyway, I wrote a gist with all my steps to get this working, in case anyone has the same problem and is a complete beginner on this subject like I am.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.