Home  >  Article  >  Backend Development  >  phpredis igbinary的编译安装有关问题

phpredis igbinary的编译安装有关问题

WBOY
WBOYOriginal
2016-06-13 13:08:331633browse

phpredis igbinary的编译安装问题
php里面使用下面的语句
$redis->setOption( Redis::OPT_SERIALIZER, Redis::SERIALIZER_IGBINARY );

老是出现这个错误,应该是编译的时候没有启用igbinary

Fatal error: Undefined class constant 'SERIALIZER_IGBINARY'


先安装的phpredis没有加--enable-redis-igbinary,之后才安装了igbinary,然后重新编译了phpredis,如下:
./configure --enable-redis-igbinary -with-php-config=/usr/local/php/bin/php-config

编译成功了,也在php.ini里面加了扩展,重启了怎么就是会出现上面的错误



对编译不熟悉,谁知道怎么编译才能让phpredis支持igbinary


------解决方案--------------------
不需要igbinary的,你这个是没指定序列化工具
configure的时候--with-serializer这个可选项看看
configure --help应该会有

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article: php函数学习一 Next article: 为何说PHP是个集中营