• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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