Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
New PHP Client Library for Couchbase
C PHP
branch: master

This branch is 6 commits behind brett19:master

Failed to load latest commit information.
examples Added transcoder example.
stub PCBC-331: Implemented flush via REST rather than Memcached.
tests PCBC-310: Corrected segmentation faults when performing operations.
.gitignore PCBC-310: Corrected segmentation faults when performing operations.
.travis.yml Initial Commit
LICENSE Initial Commit
README.md Updated README to point to couchbaselabs.
bucket.c PCBC-332: Correct various memory leaks.
bucket.h PCBC-310: Corrected segmentation faults when performing operations.
cas.c PCBC-332: Correct various memory leaks.
cas.h PCBC-310: Corrected segmentation faults when performing operations.
cluster.c PCBC-310: Corrected segmentation faults when performing operations.
cluster.h PCBC-310: Corrected segmentation faults when performing operations.
config.m4 PCBC-310: Corrected segmentation faults when performing operations.
config.w32 PCBC-310: Corrected segmentation faults when performing operations.
couchbase.c PCBC-332: Correct various memory leaks.
couchbase.h PCBC-310: Corrected segmentation faults when performing operations.
datainfo.h PCBC-310: Corrected segmentation faults when performing operations.
exception.c PCBC-310: Corrected segmentation faults when performing operations.
exception.h PCBC-310: Corrected segmentation faults when performing operations.
genphpfile.sh PCBC-310: Corrected segmentation faults when performing operations.
metadoc.c PCBC-332: Correct various memory leaks.
metadoc.h PCBC-310: Corrected segmentation faults when performing operations.
package2.xml Release 2.0.6.
paramparser.h PCBC-321: Prevent paramparser from segfaulting with non-array options…
php_couchbase.h Release 2.0.6.
phphelpers.h PCBC-310: Corrected segmentation faults when performing operations.
phpstubstr.h PCBC-331: Implemented flush via REST rather than Memcached.
transcoding.c PCBC-335: Correct segfault caused by recent memory leak cleanup.
transcoding.h PCBC-310: Corrected segmentation faults when performing operations.

README.md

Couchbase PHP Client

This library allows you to connect to a Couchbase cluster from PHP. It is a native PHP extension and uses the very fast libcouchbase library to handle communicating to the cluster over the Couchbase binary protocol.

Build Status

Useful Links

Source - http://github.com/couchbaselabs/php-couchbase

Bug Tracker - http://www.couchbase.com/issues/browse/PCBC

Couchbase PHP Community - http://couchbase.com/communities/php

Installing

This iteration of the Couchbase PHP client is not currently available via PECL, and as such must be compiled manually in order to be used. The extension will become available via PECL once it leaves the DP phase. Until then, you may install by downloading a prebuilt binary of the DP available on couchbase.com for the Windows platform, or by checking out the repository and building it directly:

phpize
./configure --enable-couchbase
make && make install

Introduction

Connecting to a Couchbase bucket is as simple as creating a new Connection instance. Once you are connect, you may execute any of Couchbases' numerous operations against this connection.

Here is a simple example of instantiating a connection, setting a new document into the bucket and then retrieving its contents:

  $cluster = new CouchbaseCluster('192.168.7.26');
  $db = $cluster->openBucket('default');
  $db->upsert('testdoc', array('name'=>'Frank'));
  $res = $db->get('testdoc');
  var_dump($res->value);
  // array(1) {
  //   ["name"]=>
  //   string(5) "Frank"
  // }

Documentation

An extensive documentation is available on the Couchbase website. Visit our PHP Community on the Couchbase website for the documentation as well as numerous examples and samples.

Source Control

The source code is available at https://github.com/couchbaselabs/php-couchbase.

To execute our test suite, simply install and execute phpunit against your checked out source code.

License

Copyright 2013 Couchbase Inc.

Licensed under the Apache License, Version 2.0.

See LICENSE for further details.

Something went wrong with that request. Please try again.