V4.0 CE breaks memcached compatibility with Laravel (and possibly other framework)

Hi, it looks like there is an issue with command version on CE 4.0

For instance:

version 4.0
# telnet localhost 11212 Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. version VERSION

While on the version 3.0.1
# telnet localhost 11211 Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. version VERSION 2.1.1r-49-gbe05158

Laravel (and possibly other frameworks/client) uses GetVersion command, which will give an invalid output (version status 255.255.255) which would break the connection to the server.

The only way for us was to rollback to 3.0.1 waiting for the fix.

That does appear to be an issue. I’ve filed MB-17253. Since it’ll take a little while, as a workaround, I’d recommend using a standalone moxi against 4.0.1 perhaps.

8 months later I though that I’d give v4 a go (with community 4.1 released) but looks like I am still out of luck.

Currently support for php function memcached::getVersion() (see http://php.net/manual/en/memcached.getversion.php) is broken since couchbase 3.1

I used following script for testing php

<?php

$memcached = new \Memcached();
$memcached->addServer(‘localhost’, 11211);
//$memcached->addServer(‘localhost’, 7777);

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

and got following results:

couchbase-server-community_3.0.1-debian7_amd64.deb

telnet localhost 11211
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.
version
VERSION 2.1.1r-49-gbe05158

php test-memcache.php
2.1.1

All Good.

couchbase-server-community_3.1.3-debian7_amd64.deb

telnet localhost 11211
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.
version
VERSION v3.1.0

Looks good, but php test fails.

php test-memcache.php
255.255.255

Probably php memcached extension doesn’t like format of version (presence of v before version number and minor build?)

I also tried with different port (in case of sasl auth issue).

telnet localhost 7777
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.
version
VERSION v3.1.0

php test-memcache.php
255.255.255

couchbase-server-community_4.1.0-debian7_amd64.deb

telnet localhost 11211
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.
version
VERSION

php test-memcache.php
255.255.255

telnet localhost 7777
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.
version
VERSION

php test-memcache.php
255.255.255

Failing miserably, has the same behaviour as 4.0 (see opening post)

Given the fact that original bug was classified as critical and 4.1 was released 6 months later after the fix I’d thought that this issue would be solved by now.

Any thoughts on how this can be solved?