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

PHP client under ubuntu 12.04 or 12.10

18 replies [Last post]
  • Login or register to post comments
Wed, 09/12/2012 - 09:24
couchpotatoe
Offline
Joined: 09/12/2012
Groups: None

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

Top
  • Login or register to post comments
Thu, 09/13/2012 - 16:10
ingenthr
Offline
Joined: 03/16/2010
Groups:

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.

Top
  • Login or register to post comments
Thu, 10/18/2012 - 10:05
jamesquinn
Offline
Joined: 02/16/2012
Groups: None

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.

Top
  • Login or register to post comments
Mon, 10/22/2012 - 16:25
ingenthr
Offline
Joined: 03/16/2010
Groups:

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

Top
  • Login or register to post comments
Sun, 12/30/2012 - 14:50
cthomassen
Offline
Joined: 12/30/2012
Groups: None

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

Top
  • Login or register to post comments
Mon, 01/07/2013 - 03:01
karl_r
Offline
Joined: 01/07/2013
Groups: None

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.

Top
  • Login or register to post comments
Fri, 01/11/2013 - 17:03
makeawish
Offline
Joined: 12/03/2012
Groups: None

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

Top
  • Login or register to post comments
Sat, 01/12/2013 - 07:20
Me
Offline
Joined: 01/09/2013
Groups: None

Just adding, mine fails, too. (12.10)

Top
  • Login or register to post comments
Sat, 01/12/2013 - 09:55
cthomassen
Offline
Joined: 12/30/2012
Groups: None

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

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

Top
  • Login or register to post comments
Sat, 01/12/2013 - 09:56
cthomassen
Offline
Joined: 12/30/2012
Groups: None

.

Top
  • Login or register to post comments
Thu, 01/17/2013 - 02:11
tgrall
Offline
Joined: 09/05/2012
Groups: None

Hello,

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

Regards

__________________

Tug
@tgrall

Top
  • Login or register to post comments
Sun, 01/20/2013 - 13:43
Me
Offline
Joined: 01/09/2013
Groups: None

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

Top
  • Login or register to post comments
Sun, 01/20/2013 - 15:07
ingenthr
Offline
Joined: 03/16/2010
Groups:

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

Top
  • Login or register to post comments
Sun, 01/20/2013 - 16:09
OZ
Offline
Joined: 01/18/2013
Groups: None

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.

Top
  • Login or register to post comments
Sun, 01/20/2013 - 16:09
OZ
Offline
Joined: 01/18/2013
Groups: None

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.

Top
  • Login or register to post comments
Mon, 01/21/2013 - 02:45
karl_r
Offline
Joined: 01/07/2013
Groups: None

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.

Top
  • Login or register to post comments
Mon, 01/21/2013 - 14:03
makeawish
Offline
Joined: 12/03/2012
Groups: None

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

Top
  • Login or register to post comments
Mon, 01/21/2013 - 14:24
karl_r
Offline
Joined: 01/07/2013
Groups: None

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

Top
  • Login or register to post comments
Mon, 03/18/2013 - 04:55
aeramor
Offline
Joined: 03/18/2013
Groups: None

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 <a href="http://packages.couchbase.com/ubuntu/couchbase-ubuntu1204.list<br />
wget" title="http://packages.couchbase.com/ubuntu/couchbase-ubuntu1204.list<br />
wget">http://packages.couchbase.com/ubuntu/couchbase-ubuntu1204.list<br />
wget</a> -O- <a href="http://packages.couchbase.com/ubuntu/couchbase.key" title="http://packages.couchbase.com/ubuntu/couchbase.key">http://packages.couchbase.com/ubuntu/couchbase.key</a> | 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 <a href="https://github.com/couchbase/php-ext-couchbase/archive/master.zip<br />
unzip" title="https://github.com/couchbase/php-ext-couchbase/archive/master.zip<br />
unzip">https://github.com/couchbase/php-ext-couchbase/archive/master.zip<br />
unzip</a> 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

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