Configure memcache(d) for Presta

Discussion in 'Server Operation' started by Poliman, Nov 29, 2017.

  1. Poliman

    Poliman Member

    I have server with Ubuntu 16.04 LTS, with php 7.0. Command and output below:
    Code:
    root@s1:/opt/php-5.6.30/etc# ps aux | grep memcached
    memcache  1256  0.0  0.4 352036 29760 ?        Ssl  Nov09   1:07 /usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1
    root     24935  0.0  0.0  12888  1008 pts/2    S+   08:11   0:00 grep --color=auto memcached
    
    It looks like I have memcached but when I try turn on it under Presta admin panel I have error after clicked "Test server". I can only add memcache with ip and port shown above. I attached screens.
    I tried install memcached for additional php version 5.6.30 installed based on these two (working perfectly):
    Code:
    https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/#-enable-php-in-ispconfig
    https://www.howtoforge.com/how-to-use-multiple-php-versions-php-fpm-and-fastcgi-with-ispconfig-3-ubuntu-12.10
    but when I execute:
    Code:
    root@s1:/opt/php-5.6.30/etc# pecl -C ./pear.conf install memcached
    I have to put something in line at the bottom - "libmemcached directory [no] :":
    Code:
    root@s1:/opt/php-5.6.30/etc# pecl -C ./pear.conf install memcached
    pecl/memcached can optionally use PHP extension "igbinary" (version >= 2.0)
    pecl/memcached can optionally use PHP extension "msgpack" (version >= 2.0)
    downloading memcached-3.0.4.tgz ...
    Starting to download memcached-3.0.4.tgz (78,776 bytes)
    ..................done: 78,776 bytes
    15 source files, building
    running: phpize
    Configuring for:
    PHP Api Version:         20131106
    Zend Module Api No:      20131226
    Zend Extension Api No:   220131226
    libmemcached directory [no] :
    
    But I dont know what, and of course after clicked enter button I got an error:
    Code:
    checking for libmemcached location... configure: error: memcached support requires libmemcached. Use --with-libmemcached-dir=<DIR> to specify the prefix where libmemcached headers and library are located
    ERROR: `/tmp/pear/temp/memcached/configure --with-php-config=/opt/php-5.6.30/bin/php-config --with-libmemcached-dir=no' failed
    
    How to resolve it?
     

    Attached Files:

Share This Page