I have recently switched PHP versions in MAMP PRO from PHP 7.1.19 to PHP 7.2.20. I currently use Symfony 3.4. However Symfony now keeps complaining about my memcache extension missing:
I have read that this could be due to memcache not being supported in 7.2 any longer? I have already tried numerous ways to install memcache for PHP 7.2 with no luck.
pecl install memcache
However the installation fails and ends with the following line (fatal error: 'zend_config.h' file not found):
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-rootw4LXAq/memcache-2.2.7/libtool --mode=compile cc -I/Applications/MAMP/bin/php/php7.2.20/include/php -I. -I/private/tmp/pear/temp/memcache -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootw4LXAq/memcache-2.2.7/include -I/private/tmp/pear/temp/pear-build-rootw4LXAq/memcache-2.2.7/main -I/private/tmp/pear/temp/memcache -I/Applications/MAMP/bin/php/php7.2.20/include/php -I/Applications/MAMP/bin/php/php7.2.20/include/php/main -I/Applications/MAMP/bin/php/php7.2.20/include/php/TSRM -I/Applications/MAMP/bin/php/php7.2.20/include/php/Zend -I/Applications/MAMP/bin/php/php7.2.20/include/php/ext -I/Applications/MAMP/bin/php/php7.2.20/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/memcache/memcache.c -o memcache.lo
mkdir .libs
cc -I/Applications/MAMP/bin/php/php7.2.20/include/php -I. -I/private/tmp/pear/temp/memcache -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootw4LXAq/memcache-2.2.7/include -I/private/tmp/pear/temp/pear-build-rootw4LXAq/memcache-2.2.7/main -I/private/tmp/pear/temp/memcache -I/Applications/MAMP/bin/php/php7.2.20/include/php -I/Applications/MAMP/bin/php/php7.2.20/include/php/main -I/Applications/MAMP/bin/php/php7.2.20/include/php/TSRM -I/Applications/MAMP/bin/php/php7.2.20/include/php/Zend -I/Applications/MAMP/bin/php/php7.2.20/include/php/ext -I/Applications/MAMP/bin/php/php7.2.20/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/memcache/memcache.c -fno-common -DPIC -o .libs/memcache.o
In file included from /private/tmp/pear/temp/memcache/memcache.c:26:
In file included from /Applications/MAMP/bin/php/php7.2.20/include/php/main/php.h:35:
In file included from /Applications/MAMP/bin/php/php7.2.20/include/php/Zend/zend.h:29:
In file included from /Applications/MAMP/bin/php/php7.2.20/include/php/Zend/zend_types.h:27:
/Applications/MAMP/bin/php/php7.2.20/include/php/Zend/zend_portability.h:45:11: fatal error: 'zend_config.h' file not found
- I've also tried adding memcache.so to php.ini. But I'm not sure where to get the correct memcache.so file for PHP7.2
- I've added extension=memcache.so to my php.ini file in MAMP PRO > File > Edit Template > 7.2.20
Note that this error concerns memcache and not memcached. I haven't found any solutions on StackOverflow concerning my memcache error.