以前都是用的 ssdb 提供的 SSDB.php 操作ssdb数据库,后来看到有个 php的扩展:
https://github.com/jonnywang/phpssdb/wiki#install
wget https://github.com/jonnywang/phpssdb/archive/master.zip
unzip master.zip
cd phpssdb-master
phpize
./configure --with-php-config=/usr/bin/php-config
make && make install
提示 ssdb.c:42: error: ‘PHP_FE_END’ undeclared here (not in a function), baidu 后找到解决:
sed -i 's|PHP_FE_END|{NULL,NULL,NULL}|' ssdb.c
安装成功
echo extension = "ssdb.so" >> /etc/php.ini