首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >memcached igbinary支持

memcached igbinary支持
EN

Stack Overflow用户
提问于 2013-02-16 07:05:59
回答 1查看 8.2K关注 0票数 1

下面是memcached的phpinfo()输出

代码语言:javascript
复制
memcached

memcached support   enabled
Version 2.1.0
libmemcached version    1.0.4
Session support yes
igbinary support    no
json support    no

我使用的是AWS Linux AMI,我相信它是基于redhat的,并且使用YUM。

如何启用igbinary支持?

这一定要在memcached安装时发生吗?我已经有了memcached,所以现在有没有办法添加这个支持呢?

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-02-16 07:22:01

我过去常常手动编译memcached堆栈,其中包含igbinary。那是在我开始使用remi repo之前,它提供了更新的包,而没有所有手动编译的开销。

以下是我在手动编译igbinary时使用的注释:

代码语言:javascript
复制
Had to scp the source from another computer due to lack of direct links, the next steps assume pecl/memcached files are local and extracted
$ -> wget http://pecl.php.net/get/igbinary-1.1.1.tgz
$ -> tar -xzvf igbinary-1.1.1.tgz
$ -> cd igbinary-1.1.1
$ -> phpize
$ -> ./configure # No need for extra config params
$ -> make
$ -> make install # This should copy the resulting .so file to the php dir where all modules are stored
$ -> /etc/init.d/httpd restart # I remember having to do this for phpinfo to reflect the setting correctly after the udpate

现在,如果你查看你的phpinfo (或者来自cli的php -i ),igbinary support应该设置为yes。

-更新--

请确保您在php.ini或igbinary.ini中有以下行,php可以读取它:

代码语言:javascript
复制
; Enable igbinary extension module
extension=igbinary.so

更新#2 --

忘记提到,您需要使用以下标志编译memcached才能使用igbinary:

代码语言:javascript
复制
--enable-memcached-igbinary

更新#3 --

以防将来有人偶然发现这一点。手动维护PHP堆栈和常用扩展是一件痛苦的事情,而且通常不值得付出额外的努力。你最好使用发行版的包管理器来处理所有繁重的工作,下面是一个安装php与memcached并支持igbinary的示例:

代码语言:javascript
复制
yum install php php-cli php-pecl-memcached php-pecl-igbinary

如果您的发行版的php上游版本较旧,而您希望使用较新的版本,请查看REMI repo:http://blog.famillecollet.com/pages/Config-en

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14904865

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档