doujia7779 2019-08-11 18:25
浏览 228

没有加载Memcache扩展! 要配置池,必须加载它! MAMP PRO升级到PHP 7.2

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:

enter image description here

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
  1. 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
  2. I've added extension=memcache.so to my php.ini file in MAMP PRO > File > Edit Template > 7.2.20 enter image description here

Note that this error concerns memcache and not memcached. I haven't found any solutions on StackOverflow concerning my memcache error.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 delta降尺度计算的一些细节,有偿
    • ¥15 Arduino红外遥控代码有问题
    • ¥15 数值计算离散正交多项式
    • ¥30 数值计算均差系数编程
    • ¥15 redis-full-check比较 两个集群的数据出错
    • ¥15 Matlab编程问题
    • ¥15 训练的多模态特征融合模型准确度很低怎么办
    • ¥15 kylin启动报错log4j类冲突
    • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
    • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序