Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-91

Error getting view results on non-default bucket

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • None
    • 1.1.0-dp2
    • library
    • Security Level: Public
    • None

    Description

      Customer setup non-default bucket, created view and published to production.

      The view is:
      function (doc)

      { //Check for dataCount, do not include it if(doc.value != null) emit(doc.sensorId, [doc.value, doc.timestamp]); }

      When querying with this:
      $this->_CouchbaseHandle = new Couchbase($this->_Config->couchbase->host.":8091", $this->_Config->couchbase->user, $this->_Config->couchbase->password, $this->_Config->couchbase->bucket);

      $result = $this->_CouchbaseHandle->view("_design/Sensors", "getSensorById");
      foreach($result["rows"] as $row)

      { echo $row->key; }

      The following error is returned:
      Warning: Couchbase::view(): Failed to execute view: Protocol error in /var/domains/wesley.sensor-api.xanedo.com/library/Xanedo/Couchbase.php on line 87
      Warning: Invalid argument supplied for foreach() in /var/domains/wesley.sensor-api.xanedo.com/library/Xanedo/Couchbase.php on line 88

      -------------------------------------------------------

      I was able to reproduce this in-house with similar setup. Using var_dump, the $result comes back as bool(false).

      _all_docs works correctly, any production or development view does not seem to work according to these instructions: http://www.couchbase.com/develop/php/next

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mnunberg Mark Nunberg (Inactive)
            perry Perry Krug
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty