我已经用libmemcached安装了memcached
。另外,我已经安装了igbinary
。
这是我的php.ini:
; Directory in which the loadable extensions (modules) reside.
;extension_dir = "./"
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/"
extension=apc.so
apc.enabled=1
apc.shm_size=128M
extension=memcached.so
session.save_handler=memcached
session.save_path="127.0.0.1:11211"
extension=igbinary.so
session.serialize_handler=igbinary
igbinary.compact_strings=On
。
当我运行phpinfo()时,我看到启用了igbinary,但是对于memcached,不是:
apc
Serialization Support php, igbinary
igbinary
igbinary support enabled
igbinary version 1.1.1
igbinary APC serializer ABI 0
Directive Local Value Master Value
igbinary.compact_strings On On
关于memcached的phpinfo():
memcached
memcached support enabled
Version 1.0.2
libmemcached version 0.51
Session support yes
igbinary support no
最后一行:
igbinary support
多数民众赞成在这个问题。奇怪的是,您可以在apc标题下看到:Serialization Support php, igbinary
。那么有人知道为什么我不能为 memcached 启用igbinary吗?
谢谢!
最佳答案
您可以检查 Memcached::HAVE_IGBINARY 常数,以查看您的memcached扩展名是否使用--enable-memcached-igbinary进行编译。
资料来源:http://php.net/manual/en/memcached.constants.php
Memcached::OPT_SERIALIZER
Memcached::HAVE_IGBINARY
关于php - 如何启用先安装了memcached的igbinary,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/6830260/