Search code examples
phpmemcachedcouchbasefuelphp

Is it possible to connect Couchbase's Memcached bucket with memcached client?


As titled and I am using PHP with Memcached.

I tried to connect to it, but it doesn't seems working.....

    $memcached = new \Memcached();
    $memcached->addServer('xxx.xxx.xxx.xxx', 11211);

    $versions = $memcached->getVersion();
    foreach($versions as $version)
    {
        echo $version;
    }

The version returns 255.255.255.... If is possible, how?


Solution

  • I discovered the reasons is because of the firewall and as well as Couchbase requires SASL authentication when using port 11211.

    http://docs.couchbase.com/admin/admin/security/security-inside-server.html

    The above code actually is working if port is being set other than 11211.