php-ext-couchbase on Centos 6.4 Failed
I'm trying to install the php-ext-couchbase with Centos 6.4 64bit. I followed all the instruction including trying the pecl install option. I have googled every possibility and I'm still getting this error.
php -m | grep couchbase
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/couchbase.so' - /usr/lib64/php/modules/couchbase.so: undefined symbol: php_json_encode in Unknown on line 0
Is it because I'm installing it on 6.4 64 bit since I haven't find any comment from anyone who has successfully done it in Centos 6.4. Please help?
I guess I'm going to try to answer my own question after hours of trial and error. The steps I took doesn't make any sense at all but somehow it works so I'm not going to spend time trying to figure out why. I have replicated these steps in 2 different servers and they both works after these steps..
Installing Couchbase Server
First remove php-devel (don't know why but it seems to work this way). Here is the reference:
yum remove php-devel
yum install -y openssl098e
rpm -ivh http://packages.couchbase.com/releases/2.0.1/couchbase-server-community_...
go to your couchbase web browser at: "http://yourhost:8091" and configure it.
Now installing the Php-extension
yum install -y php-devel
wget -O /etc/yum.repos.d/couchbase.repo http://packages.couchbase.com/rpm/couchbase-centos62-x86_64.repo
yum install -y libcouchbase2 libcouchbase-devel libcouchbase2-libevent
pecl install couchbase
echo "extension=couchbase.so" >> /etc/php.d/json.ini
That's it. Voila......... It works. So I thought I share this with whoever can make use of it... Good luck..