更新时间:2023-02-22 10:57:42
解决的办法是做以下步骤来安装pH值为preDIS:
The solution was doing the following steps to install phpredis:
ZTS-运行phpize
./配置--with-PHP-配置=的/ usr / bin中/ ZTS-PHP-配置
制作和放大器;&安培;使安装
zts-phpize
./configure --with-php-config=/usr/bin/zts-php-config
make && make install
我在做运行phpize
,而不是 ZTS-运行phpize
,我并没有加入 --with-PHP-配置
选项:这是问题
I was doing phpize
and not zts-phpize
and I was not adding the --with-php-config
option: this was the problem
当然,你必须添加redis.ini到/etc/php-zts-5.6.d/文件夹,里面的文件:
Of course then you have to add redis.ini into /etc/php-zts-5.6.d/ folder with, inside the file:
extension=redis.so
重新启动Apache和它应该工作
Restart apache and it should work
希望这会帮助别人
P.S。如果你想让它的命令行(即PHP的script.php)工作,你也必须安装它与运行phpize
和简单的 ./配置
命令。
P.S. If you want it to work from command line (i.e. "php script.php"), you have to install it also with phpize
and simple ./configure
command.