Coder Social home page Coder Social logo

cb-workshop-php's Introduction

Couchbase PHP workshop

Source code for the Couchbase PHP workshop

Workshop Agenda

Day 1 - Couchbase Architecture and Administration Basics

  • Introduction and Use Cases
  • Couchbase Server Technical Architecture
  • Couchbase Server as a Distributed System
  • Installation and Configuration
  • Testing the Installation
  • Working with Buckets
  • Working with the Cluster
  • Backup and Restore
  • XDCR explained

Day 2 - Using the Couchbase PHP SDK 2.x

  • Document Modeling Basics
  • Managing Connections
  • Creating Documents
  • Updating Documents
  • Deleting Documents
  • Querying via Views
  • Error Handling and Logging
  • Sample Application (Idea, Requirements, ...)
  • Outlook

Preparations on MacOS

  • Prepare 3 VM-s with CentOS 6.x as your Couchbase Server node hosts ** 1.5 GB RAM ** 10 GB HDD ** Static IP-s ** Can reach each other

  • Install/update libcouchbase

brew update
brew update libcouchbase
  • Install PEAR
curl -O http://pear.php.net/go-pear.phar
php -d detect_unicode=0 go-pear.phar
  • Install the Couchbase PHP SDK
sudo pecl install couchbase
  • Make sure that the php.ini file is there
php --ini
  • Edit the php.ini file and add the couchbase extension
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension=couchbase.so
  • Double check if the right ini file is loaded by executing phpinfo() on a PHP shell (php -a)
Loaded Configuration File => /etc/php.ini

These steps should more or less also work on other *IX systems. Please follow our documentation for the installation on Windows (http://docs.couchbase.com/developer/php-2.0/download-links.html)!

Getting started

There is a PHP file 'settings.php' which contains the connection details to the Couchbase Cluster

define(CB_HOST, "couchbase://192.168.7.155,192.168.7.160");
define(CB_BUCKET, "workshop");
define(CB_BUCKET_PWD, "test");

I used Netbeans 8.x for developing this, which allows you to run the application within the PHP built-in Web Server.

/usr/bin/php -S "localhost:9090"

cb-workshop-php's People

Contributors

dmaier-couchbase avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.