Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

PHP SDK under Debian Squeeze and PHP 5.2.17 - wrong module version

3 replies [Last post]
  • Login or register to post comments
Tue, 09/04/2012 - 07:36
tommics
Offline
Joined: 09/04/2012
Groups: None

Hey Guys,

we successfully installed the couchbase Server 1.8.1 in order to migrate from memcache to couchbase.
It works using the old PECL/memcache module but we found out that when rebalancing the keys across the cluster the whole traffic is proxied through the server which is connected to.

In order to use a serverpool properly we wanted to make use of the couchbase php client lib. So we downloaded
http://packages.couchbase.com/clients/php/php-ext-couchbase-1.0.5-ubuntu... copied it to our php lib dir and put the extension=couchbase.so in the php.ini file.

When starting php -m we see no couchbase module is loaded. Log says:

Sep  4 16:24:15 localhost php: PHP Warning:  PHP Startup: couchbase: Unable to initialize module#012Module compiled with module API=20090626, debug=0, thread-safety=0#012PHP    compiled with module API=20060613, debug=0, thread-safety=0#012These options need to match#012 in Unknown on line 0

ok now we cloned git hub for compiling it ourselves.

git clone https://github.com/couchbase/php-ext-couchbase

When trying to configure

./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local/php-5.2.17
checking for PHP includes... -I/usr/local/php-5.2.17/include/php -I/usr/local/php-5.2.17/include/php/main -I/usr/local/php-5.2.17/include/php/TSRM -I/usr/local/php-5.2.17/include/php/Zend -I/usr/local/php-5.2.17/include/php/ext -I/usr/local/php-5.2.17/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php-5.2.17/lib/php/20060613
checking for PHP installed headers prefix... /usr/local/php-5.2.17/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for couchbase support... yes, shared
checking whether to enable json serializer support... yes, shared
checking for ZLIB... no
checking for FastLZ... no
checking for libcouchbase files in default path... found in /usr
checking for lcb_connect in -lcouchbase... no
configure: error: wrong couchbase lib version or lib not found

ldd couchbase.so
        linux-vdso.so.1 =>  (0x00007fff05fff000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f3fa0fef000)
        libcouchbase.so.1 => /usr/lib/libcouchbase.so.1 (0x00007f3fa0dde000)
        libc.so.6 => /lib/libc.so.6 (0x00007f3fa0a7b000)
        libvbucket.so.1 => /usr/lib/libvbucket.so.1 (0x00007f3fa0873000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007f3fa066f000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f3fa1420000)
        libm.so.6 => /lib/libm.so.6 (0x00007f3fa03ec000)

ldconfig -v|grep couch
        libcouchbase_libevent.so.1 -> libcouchbase_libevent.so.1.0.0
        libcouchbase.so.1 -> libcouchbase.so.1.2.4

dpkg -l|grep -i Couch
ii  libcouchbase-dev                        1.0.6-1                      library for the Couchbase protocol, development files
ii  libcouchbase1                           1.0.6-1                      library for the Couchbase protocol
ii  libvbucket1                             1.8.0.4-1                    vbucket library for Couchbase

Can you help us out somehow? Or is there a proper way to avoid proxiing through one server?

Thank you very much
Thomas

Top
  • Login or register to post comments
Thu, 09/06/2012 - 02:32
tommics
Offline
Joined: 09/04/2012
Groups: None

any ideas?

Top
  • Login or register to post comments
Thu, 09/06/2012 - 14:31
mnunberg
Offline
Joined: 04/25/2012
Groups: None

If you check out from git, you have the following options:

1) Checkout the 1.0.x branch of the php-ext-couchbase (git checkout 1.0.x)
2) Compile and install the latest libcouchbase on git (master branch).

The error you are seeing is a mismatch between the PHP core API version and the one running on your system.

Your best and quickest solution would probably be to recompile the php module, (and not worry about libcouchbase) by simply checking out the 1.0.x branch.

Top
  • Login or register to post comments
Mon, 09/10/2012 - 05:50
tommics
Offline
Joined: 09/04/2012
Groups: None

thank you, will try that.

besides using couchbase lib in php we got around the problem by using client-side moxi as the smart client.
http://www.couchbase.com/docs/moxi-manual-1.8/moxi-clientside.html

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker