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

Failed to execute view in php-ext-module

3 replies [Last post]
  • Login or register to post comments
Fri, 08/24/2012 - 16:37
CriztianiX
Offline
Joined: 08/23/2012
Groups: None

When I try to execute a view with php extension (1.1dp3) i get the following error:
Couchbase::view() [couchbase.view]: Failed to execute view: Protocol error in ....

The php code look like:

<?php
$cb = new Couchbase("127.0.0.1:8091", "root", "metallica324", "default");
$result = $cb->view("_all_docs", "view_name?include_docs=true");
foreach($result["rows"] as $row) {
echo $row->key;
}

Thnx!

Top
  • Login or register to post comments
Wed, 08/29/2012 - 05:49
daschl
Offline
Joined: 05/19/2012
Groups: None

Hello CriztianiX,

two things here:

- First, you don't want to mix _all_docs and a custom view name. If you want to include the actual docs for the _all_docs query, use it this way: $cb->view("_all-docs", "?include_docs=true");

- Second, in dp3 the view support is only half-baked (only _all_docs works). I've recently pushed a fix for this to GitHub, but you'll want to wait for dp4 which includes it. If you're curious and want to walk "on the wild side", you can clone the master repository (https://github.com/couchbase/php-ext-couchbase) and compile it for yourself (phpize; ./configure; make && sudo make install).

If you have any further questions, don't hesitate to ask.

Best,
Michael

Top
  • Login or register to post comments
Wed, 02/06/2013 - 07:01
fenster.ben
Offline
Joined: 02/06/2013
Groups: None

i have the latest 1.1.2 compiled and running and all commands works except the view command. can you please help me ???

Top
  • Login or register to post comments
Sun, 02/10/2013 - 21:54
daschl
Offline
Joined: 05/19/2012
Groups: None

I'll try if you can provide me more details? Whats wrong? Please show us some logs and the code you execute. Thanks!

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