|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-11-03 02:58 UTC] errietta at hotmail dot com
[2010-11-26 01:03 UTC] hradtke@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 15:00:01 2025 UTC |
Description: ------------ In PHP Version 5.3.2-1ubuntu4.5, php-memcache version 3.0.4- 2build1 When setting an integer value using memcache::set I can retrieve it without a problem by connecting to localhost:11211 and issuing a GET command. However, memcache::get will always return false when outputting the value of that variable. The same also happens with floats (such as 0.5) Reproduce code: --------------- Example PHP code <?php $memcache_obj = new Memcache(); $memcache_obj -> connect ('localhost',11211); $memcache_obj -> set ("my_var", 5, MEMCACHE_COMPRESSED, 0); var_dump ($memcache_obj -> get ("my_var")); //will always output bool(false) ?> However, using netcat: errietta@Mewtwo:~$ nc localhost 11211 get my_var VALUE my_var 770 1 5 END Expected result: ---------------- I was expecting my_var to be an int(5) Actual result: -------------- bool (false) was outputted.