How do use couchbase php library in Zend Framework 2.0?
Couchbase php extension was recognized when i used Zend Framework 1.12 but now that I am moving on to Zend Framework 2.0 , it is no longer recognized.
Hi Dunkspot,
technically speaking, the PHP extension has nothing to do with the Zend Framework which is just a PHP library sitting on top.
Are you also using the Zend Server in combination with the framework? If you've upgraded, you may also need to recompile/readd the extension to the upgraded server. Also, if you've tried to load it make sure to check the integrated web gui if it reports any errors on loading the extension.
If the extension is loaded correctly, the couchbase methods should be available to use. From there on, its a matter of correctly integrating it into the zend framework.
If you have specific information let us know! helpful would be a phpinfo() output or something like this.
Best,
Michael
I figured in out.It works now , this was due to use of namespaces in Zend framework 2.0 . I had to backslash couchbase (\couchbase) instead of just (couchbase) when creating a new couchase object ,i.e
$cb = new \couchbase("host","username","password","bucket");
I wrote a cache backend for the Zend framework to utilize the php extension.
Not sure if this will help you, but you can download the file from my website at:
http://silverdire.com/2012/10/04/native-connection-php-couchbase/
Does the new framework version perhaps use a different PHP extension directory? Perhaps you need to install there? Check that php -i gives you the extension directory you've installed the couchbase extension into.