[Solved] PHP: undefined symbol libcouchbase_set_couch_complete_callback
Good afternoon,
I am using debian 6.0.5 and PHP 5.4.5-dev. I have installed C client library from source deb http:/ /packages.couchba se.com/ubuntu oneiric oneiric/main and then PHP SDK 1.1.0-dp2-ubuntu1110-i686 (it should be debian compatible). Unfortunately I got the following error:
PHP Warning: PHP Startup: Unable to load dynamic library 'couchbase.so' - couchbase.so: undefined symbol: libcouchbase_set_couch_complete_callback in Unknown on line 0
I don't understand what does it cause or how to debug it properly. Can you please give me an advice? Thank you
* I had to add spaces to the source URL because this forum had a problem with it
I had successfully compiled php-ext-couchbase v1.1.0-dp1 last week. But this v1.1.0-dp2 is giving errors during compilation:
libtool: compile: cc -I. -I/home/ec2-user/html/couchbase-php-ext-couchbase-4609e2a -DPHP_ATOM_INC -I/home/ec2-user/html/couchbase-php-ext-couchbase-4609e2a/include -I/home/ec2-user/html/couchbase-php-ext-couchbase-4609e2a/main -I/home/ec2-user/html/couchbase-php-ext-couchbase-4609e2a -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/ -DHAVE_CONFIG_H -g -O2 -c /home/ec2-user/html/couchbase-php-ext-couchbase-4609e2a/couchbase.c -fPIC -DPIC -o .libs/couchbase.o /home/ec2-user/html/couchbase-php-ext-couchbase-4609e2a/couchbase.c:1159: error: expected â)â before ârequestâ /home/ec2-user/html/couchbase-php-ext-couchbase-4609e2a/couchbase.c: In function âphp_couchbase_create_implâ: /home/ec2-user/html/couchbase-php-ext-couchbase-4609e2a/couchbase.c:1287: error: âphp_couchbase_complete_callbackâ undeclared (first use in this function) /home/ec2-user/html/couchbase-php-ext-couchbase-4609e2a/couchbase.c:1287: error: (Each undeclared identifier is reported only once /home/ec2-user/html/couchbase-php-ext-couchbase-4609e2a/couchbase.c:1287: error: for each function it appears in.) make: *** [couchbase.lo] Error 1
Please help.
[Edit]
Me bad. Got to have latest dp version of libcouchbase in order to compile.
Compiling the PHP extension from source https://github.com/couchbase/php-ext-couchbase solves the problem. (Why isn't this recommended in the manual?)