Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0.3
    • Component/s: library
    • Security Level: Public
    • Labels:

      Description

      Here is a sample script that demonstrates the problem:

      <?php

      // configure Memcached to talk to bejc bucket
      $mc = new Memcached();
      $mc->addServer("mem1-bjb.test.vte.customer.com", 11214);
      // configure Couchbase to talk to becj bucket
      $cb = new Couchbase("mem1-bjb.test.vte.customer.com:8091", "", "", "bejc");

      echo "Setting testKeyOne with Memcached\n";
      $mc->set("testKeyOne", "testValueOne");

      echo "Getting testKeyOne with Memcached\n";
      var_dump($mc->get("testKeyOne"));

      echo "Getting testKeyOne with Couchbase\n";
      var_dump($cb->get("testKeyOne"));

      echo "----------\n";

      echo "Setting testKeyTwo with Couchbase\n";
      $cb->set("testKeyTwo", "testValueTwo");

      echo "Getting testKeyTwo with Couchbase\n";
      var_dump($cb->get("testKeyTwo"));

      echo "Getting testKeyTwo with Memcached\n";
      var_dump($mc->get("testKeyTwo"));

      ?>

      You need to have a Couchbase server setup with a Couchbase bucket type. Alter server names and ports/buckets to match your setup.

      Save the script in a file called test.php and then run it: php test.php

      The output should look something like the following:

      Setting testKeyOne with Memcached
      Getting testKeyOne with Memcached
      string(12) "testValueOne"
      Getting testKeyOne with Couchbase
      int(0)
      ----------
      Setting testKeyTwo with Couchbase
      Getting testKeyTwo with Couchbase
      string(12) "testValueTwo"
      Getting testKeyTwo with Memcached
      NULL

      The script requires the Couchbase PHP library and the Memcached library to be installed.

      On Debian/Ubuntu you can install the Memcached library by running:

      apt-get install php5-memcached

      Because of the size of our code base we need to slowly migrate to the Couchbase library so interoperability is needed. For example while we may update the actual game code to use Couchbase it might take us a while to update the CS Tools that we use to solve customer problems.

      1. test.out
        0.6 kB
        Sergey Avseyev
      2. test.php
        1 kB
        Sergey Avseyev
      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        avsej Sergey Avseyev added a comment -

        The script which tests new compatibility patch

        Show
        avsej Sergey Avseyev added a comment - The script which tests new compatibility patch
        Hide
        avsej Sergey Avseyev added a comment -

        I've made a patch which fixes compatibility http://review.couchbase.org/15133

        But there are features which implemented in memcached but missing in the couchbase extension. like igbinary serializer

        Show
        avsej Sergey Avseyev added a comment - I've made a patch which fixes compatibility http://review.couchbase.org/15133 But there are features which implemented in memcached but missing in the couchbase extension. like igbinary serializer
        Hide
        jan Jan Lehnardt (Inactive) added a comment -

        @Sergey, The patch looks good, just, as noted on gerrit, it makes test/010.phpt fail.

        We deliberately didn't implement all the serialisation methods from ext/memcached, including igbianry. If they are requested, we are happy to look into adding them

        Show
        jan Jan Lehnardt (Inactive) added a comment - @Sergey, The patch looks good, just, as noted on gerrit, it makes test/010.phpt fail. We deliberately didn't implement all the serialisation methods from ext/memcached, including igbianry. If they are requested, we are happy to look into adding them
        Hide
        perry Perry Krug added a comment -

        Thanks guys, can I send something back to the customer to have them verify?

        Show
        perry Perry Krug added a comment - Thanks guys, can I send something back to the customer to have them verify?
        Hide
        ingenthr Matt Ingenthron added a comment -

        Verification supplied via email.

        Show
        ingenthr Matt Ingenthron added a comment - Verification supplied via email.

          People

          • Assignee:
            jan Jan Lehnardt (Inactive)
            Reporter:
            perry Perry Krug
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes