How to use memcached with php7?

I tried to find any information on using Memcached with PHP7, but I failed. The only valuable information is a short Readme.md php-memcached repo .
Unfortunately, his travis build failed, and 30/126 tests on my machine.

However, the team make installwas successful and created the file memcached.so. Does this mean that I can use this extension in production or it still has errors and is not recommended to be used?

I would greatly appreciate any advice or work solutions.

+4
source share
4 answers

You need to use a branch php7; see here , travis passes.

This should be the complete set of steps for installing the extension memcachedon the Debian / Ubuntu OS:

sudo apt-get update
sudo apt-get install -y libmemcached-dev libmemcached11 git build-essential

git clone https://github.com/php-memcached-dev/php-memcached
cd php-memcached
git checkout php7
git pull

/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config

make
sudo make install

You may need to change some of the paths if you installed them in different places.

+6
source

To install memcached on the latest version of ubuntu for the latest use of php:

sudo apt-get install php-memcached
+4
source

Debian 8 :

sudo apt-get install php7.0-memcached
+3

, Laravel Lumen.

PHP 7. PHP 7.0.15-0ubuntu0.16.04.4, .

, , PHP 5 * memcached & dagger;:

sudo apt install memcached php-memcached


*

php-memcached/xenial,now 2.2.0-51-ge573a6e+2.2.0-2build2 amd64 [installed]
  memcached extension module for PHP5, uses libmemcached

& dagger; If you find that then you get an error: [RuntimeException] Could not establish Memcached connection.you need to install the memcached extension as described above sudo apt install memcached(if you use 16.04+, use apt-getif <16.04)

0
source

All Articles