如何在PHP7中使用Memcached? [英] How to use Memcached with PHP7?
问题描述
我试图找到有关将Memcached与PHP7结合使用的任何信息,但失败了.唯一有价值的信息是
不幸的是,它的 travis构建失败了,并且
I was trying to find any information about using Memcached with PHP7, but I failed. The only valuable information is short Readme.md
of php-memcached repo.
Unfortunately, its travis build failed as well as 30/126 tests on my machine.
但是make install
命令成功并创建了memcached.so
文件.这是否意味着我可以在生产中使用此扩展,或者它仍然存在错误并且不建议使用?
However make install
command was successful and created memcached.so
file. Does it mean I can use this extension in production or it still has bugs and is not recommended for using?
我将非常感谢任何建议或可行的解决方案.
I will very appreciate any advice or working solution.
推荐答案
您需要使用php7
分支; 请参见此处,特拉维斯过去了.
You need to use the php7
branch; see here, Travis is passing.
这应该是在Debian/Ubuntu操作系统上安装memcached
扩展程序的完整步骤集:
This should be the complete set of steps to install the memcached
extension on a 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 have them installed at different locations.
这篇关于如何在PHP7中使用Memcached?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!