PHP client under ubuntu 12.04 or 12.10


#1

Hi,
I wonder how do I install the client library for PHP on ubuntu 12.04 or 12.10?
I can only find packages/sources for older versions of ubuntu.
Any help is apreciated.

Thanks,
Mr. Couchpotatoe


#2

Chances are the Ubuntu 11 extension will work fine on Ubuntu 12, but at the moment Ubuntu 12 is not part of our test coverage for release and we do not build there.


#3

At the moment, I’m struggling to get the Oneiric version to work in 12.04. I haven’t been able to source/make/compile a version here either. I can install Couchbase just fine, but the PHP extension fails.


#4

How does it fail? We’ll help get things worked out.


#5

I successfully built libcouchbase and php-ext-couchbase from source on Ubuntu 12.10.
Remember not to delete the default bucket before running “make test” or the tests will fail.
Edit your /etc/php5/apache2/php.ini and your /etc/php5/cli/php.ini to include e.g : “extension=/usr/lib/php5/20100525/couchbase.so”

Regards,
cthomassen


#6

It would be really nice if there were pre-built version of the PHP extension for Ubuntu 12.04. Ubuntu 12.04 is an LTS release and my dedicated server provider does not even provide Ubuntu 11.10 any more.


#7

Hello,
I have been using the 11.10 build on my Ubuntu 12.10 with no problem
Regards


#8

What version of php do you have on your ubuntu 12.04 or 12.10 server ?


#9

I’m using the PHP version from the Ubuntu 12.10 repo:
PHP 5.4.6-1ubuntu1.1


#10

Didn’t try to compile it. I’ll just wait till Couchbase’s clients are fixed or whatever.


#11

Hi Me,

(that sounds odd)

To our knowledge, you shouldn’t need to compile but that depends a bit on PHP compatibility. What is it that fails?

Matt


#12

Actually current Couchbase PHP SDK precompiled package for Ubuntu 11.10 is not compatible with PHP 5.4 (different API). And it cannot be compatible, because PHP package in Ubuntu 11.10 was for version 5.3.6, not 5.4.
It’s not difficult to compile SDK from sources, but it’s just less convenient.

debian squeezy, PHP 5.4 - SDK doesn’t work from package (old API).
Of course, it’s not a problem to compile from sources, but, you know it’s much more convenient to use just apt-get update.


#13

Exactly, the API version of PHP are different. It would be amazingly convenient if couchbase provided precompiled versions since the manual compilation introduces more manual steps when setting up a new server.


#14

Below is a link to couchbase.so compiled for PHP 5.4.X, i tested it with 5.4.10 it it works both on CentOS as well a Fedora 17. To avoid any issues, copy file into the required PHP ext dir and add “extension=couchbase.so” on new line
after extension=json.so in the json.ini file. that will make sure json is loaded before and there will be no need to edit php.ini.

Hope that helps…

Couchbase.so for PHP 5.4.X
https://www.dropbox.com/s/pelebo3hbyugdvg/couchbase.rar


#15

Makeawish,

Thanks for your efforts but our policy prevents me from introducing untrusted binaries on our system which is why I am so eager to get official files.

Thanks anyway!

Karl


#16

I just walked through this myself on a pretty much blank 12.10 ubuntu rack space server and it worked well and didn’t take long.

Prior to this I had done:

apt-get install apache2
apt-get install php5

Here were the steps I took:

sudo bash

C Client:

wget -O/etc/apt/sources.list.d/couchbase.list http://packages.couchbase.com/ubuntu/couchbase-ubuntu1204.list

wget
-O- http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
apt-get update
apt-get install libcouchbase2 libcouchbase-dev

PHP Client:

apt-get install php5-dev
apt-get install make
apt-get install unzip
cd ~
wget https://github.com/couchbase/php-ext-couchbase/archive/master.zip

unzip
master.zip
cd php-ext-couchbase-master/package
cp make-package.sh
cd …
./make-package.sh


// here I ran ‘make test’ and it went well (95% success)
// note: you need the server installed and running with default bucket to run 'make test’


cd modules
ls

Now you should see the couchbase.so complete! Copy where needed for you and don’t forget to update php.ini

Cheers!

-randy