couchbase php, mac, nginx
Hello
i'm trying since 3 days to make couchbase client works for nginx on mac for php
i have installed couchbase server for mac
i have compiled libcouchbase with libvbucket manually
added couchbase.so on php.ini and this is the error im getting when try to run php-cgi:
HP Warning: PHP Startup: Unable to load dynamic library '/opt/local/etc/php5/modules/couchbase.so' - dlopen(/opt/local/etc/php5/modules/couchbase.so, 9): Library not loaded: /usr/local/lib/libcouchbase.1.dylib Referenced from: /opt/local/etc/php5/modules/couchbase.so Reason: Incompatible library version: couchbase.so requires version 6.0.0 or later, but libcouchbase.1.dylib provides version 4.0.0 in Unknown on line 0
and when try to run php script and call new couchbase instance i'm getting php Fatal error: Class 'Couchbase' not found in ..
please any help !
thanks
Anyone having a clue on that?
Fixed. It seems it was some incompatibility with the precompiled PHP SDK. By downloading the source files and compiling locally, everything worked fine
Quick followup, how did you manage to recompile the php-ext-sdk. I tried to fork from github but there is no configure script. I used git clone https://github.com/couchbase/php-ext-couchbase.git. The instructions show that you have to configure make and make install.
Thanks
Try running "phpize" before "configure". That should solve your problem.
There is no configure script because, as spassas said, the "phpize" command configures it for you. This is because the command checks for your local installation and configures the paths and so on (so you can run make install).
The process is as follows:
$ phpize
$ ./configure
$ make
$ make test # OPTIONAL
$ make install # as root on linux
If you encounter errors during these steps, feel free to post them here.
Regards,
Michael
i have the same problem.
i followed your steps, but it reported errors when "make":
............couchbase-php-ext-couchbase-4609e2a/couchbase.c:1159:45: error:
unknown type name 'libcouchbase_couch_request_t'
static void php_couchbase_complete_callback(libcouchbase_couch_request_t request,
any one could help me?
thanks!
Too compile the PHP extension correctly, you need to make sure you run the appropriate versions for both libcouchbase and php-ext-couchbase.
Can you tell me which version you'd want to compile (you can find that out by either checking via your repository or by runnning "cbc version").
As a starting point, you should compile the "current" version against the "current" version - and the same for "next".
I'm running libcouchbase1.1.0dp6 and php-ext-couchbase 1.1-dp2.
Regards,
Michael
yes, the php-ext-couchbase version is newer than libcouchbase.
thanks, now i have fixed it.
any one please !