|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-04-27 13:30 UTC] miksir at maker dot ru
Description:
------------
Value not stored or stored but not received back.
pecl/memcache 3.0.4
memcached 1.2.6
Reproduce code:
---------------
correct:
$memcache_obj = memcache_connect('localhost', 11211);
memcache_set($memcache_obj, 'test123112', 'string', MEMCACHE_COMPRESSED, 30);
$ret = memcache_get($memcache_obj, 'test123112');
var_dump($ret);
string(6) "string"
uncorrect:
$memcache_obj = memcache_connect('localhost', 11211);
memcache_set($memcache_obj, 'test123112', 1, MEMCACHE_COMPRESSED, 30);
$ret = memcache_get($memcache_obj, 'test123112');
var_dump($ret);
bool(false)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 00:00:02 2025 UTC |
test script: <?php error_reporting(E_ALL & E_STRICT); ini_set("display_errors", "stderr"); $memcache_obj = memcache_connect('10.55.1.6', 11211); memcache_set($memcache_obj, 'test123112', 1, MEMCACHE_COMPRESSED, 30); $ret = memcache_get($memcache_obj, 'test123112'); var_dump($ret); ?> PHP 5.2.10 Tested on memcached 1.2.6 and memcached 1.4.4 pecl-memcache 3.0.2 test script result: string(1) "1" server ~ # strace -e send,recv php membug_test.php send(3, "set test123112 0 10 1\r\n1\r\n", 26, 0) = 26 recv(3, "STORED\r\n", 32768, 0) = 8 send(3, "get test123112\r\n", 16, 0) = 16 recv(3, "VALUE test123112 0 1\r\n1\r\nEND\r\n", 32768, 0) = 30 string(1) "1" pecl-memcache 3.0.4 pecl-memcache 3.0.5-dev ($Revision: 296729 $) server ~ # strace -e send,recv php membug_test.php send(3, "set test123112 770 10 1\r\n1\r\n", 28, MSG_NOSIGNAL) = 28 recv(3, "STORED\r\n", 32768, 0) = 8 send(3, "get test123112\r\n", 16, MSG_NOSIGNAL) = 16 recv(3, "VALUE test123112 770 1\r\n1\r\nEND\r\n", 32768, 0) = 32 bool(false) If we disable compressing all work fine - memcache_set($memcache_obj, 'test123112', 1, MEMCACHE_COMPRESSED, 30); + memcache_set($memcache_obj, 'test123112', 1, 0, 30); pecl-memcache 3.0.5-dev ($Revision: 296729 $) server ~ # strace -e send,recv php membug_test.php send(3, "set test123112 768 10 1\r\n1\r\n", 28, MSG_NOSIGNAL) = 28 recv(3, "STORED\r\n", 32768, 0) = 8 send(3, "get test123112\r\n", 16, MSG_NOSIGNAL) = 16 recv(3, "VALUE test123112 768 1\r\n1\r\nEND\r\n", 32768, 0) = 32 int(1)