Skip to content
Lorna Jane Mitchell edited this page Aug 3, 2017 · 5 revisions

PHP CouchDB is a lightweight library wrapping Guzzle to make it easy to work with documents in CouchDB. Requirements: PHP7+, CouchDB 2.0 or later (but quite a lot of things will work with CouchDB 1.6, we're just not supporting it)

Here on the wiki you will find a selection of examples and other resources. There is also API documentation; this doesn't currently have a permanent home so you should generate this yourself using composer phpcs in the top-level directory. This places the API docs in the docs/ folder.

Quick Start

Install the project with Composer:

composer require ibm-watson-data-lab/php-couchdb:dev-master

A simple use case to check you can connect to CouchDB and check what version of CouchDB it's running.

<?php

require "vendor/autoload.php";

$server = new \PHPCouchDB\Server(["url" => "http://localhost:5984"]);
echo $server->getVersion();

Support

If you have questions or feature requests, or notice a bug, please file an issue on the GitHub project https://github.com/ibm-watson-data-lab/php-couchdb/issues. We're always happy to hear from you!

Clone this wiki locally