• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Resolved Install memcache PHP7 error

Bogdan1

Regular Pleskian
Hello,

how can I install memcache(not memcached) for php7?
I tried this:
/opt/plesk/php/7.0/bin/pecl install memcache

but I've got this error:

running: make

/bin/sh /tmp/pear-build-rootbaIglr/memcache-2.2.7/libtool --mode=compile cc -I/opt/plesk/php/7.0/include/php -I. -I/tmp/memcache -DPHP_ATOM_INC -I/tmp/pear-build-rootbaIglr/memcache-2.2.7/include -I/tmp/pear-build-rootbaIglr/memcache-2.2.7/main -I/tmp/memcache -I/opt/plesk/php/7.0/include/php -I/opt/plesk/php/7.0/include/php/main -I/opt/plesk/php/7.0/include/php/TSRM -I/opt/plesk/php/7.0/include/php/Zend -I/opt/plesk/php/7.0/include/php/ext -I/opt/plesk/php/7.0/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/memcache/memcache.c -o memcache.lo

libtool: compile: cc -I/opt/plesk/php/7.0/include/php -I. -I/tmp/memcache -DPHP_ATOM_INC -I/tmp/pear-build-rootbaIglr/memcache-2.2.7/include -I/tmp/pear-build-rootbaIglr/memcache-2.2.7/main -I/tmp/memcache -I/opt/plesk/php/7.0/include/php -I/opt/plesk/php/7.0/include/php/main -I/opt/plesk/php/7.0/include/php/TSRM -I/opt/plesk/php/7.0/include/php/Zend -I/opt/plesk/php/7.0/include/php/ext -I/opt/plesk/php/7.0/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/memcache/memcache.c -fPIC -DPIC -o .libs/memcache.o

/tmp/memcache/memcache.c:40:40: fatal error: ext/standard/php_smart_str.h: No such file or directory

#include "ext/standard/php_smart_str.h"

^

compilation terminated.

make: *** [memcache.lo] Error 1

ERROR: `make' failed

Thanks
 
Hi Bogdan1,

pls. be aware, that not all pecl - packages are compatible with all current ( and feature ) PHP - versions. One reason can be, that they are not maintained anymore, which is likely the case, when you see no updates/patches for several years. Pls. see for example:

=> https://pecl.php.net/package/memcache

... and you will notice, that the last release was at "2013-04-07".


Nevertheless, some extensions have been ported by other users over the internet, which could solve issues/errors/problems, but be aware that since they are no official releases, you would use such ported extensions on your very own risk, without any support!

A ported MEMCACHE - version for PHP 7 can be found at GitHub => websupport-sk/pecl-memcache

... and the steps to use such a ported extension are :
!!! Due to the fact, that this is a PORTED extension, you don't need to run "make install" now... you just COPY the corresponding *.so to your Plesk PHP 7 - MODULES - folder !!!​
  • cp /root/addons/php/extensions/pecl-memcache-NON_BLOCKING_IO_php7/modules/memcache.so /opt/plesk/php/7.0/lib/php/modules/
  • echo "extension = memcache.so" > /opt/plesk/php/7.0/etc/php.d/memcache.ini
  • plesk bin php_handler --reread
  • make clean
  • service apache2 restart ( or for CentOS/RHEL - based systems, pls. use: service httpd restart )
  • service plesk-php70-fpm restart
 
Back
Top