note 84275 added to function.memcache-get

From: Date: Mon, 07 Jul 2008 14:39:50 +0000
Subject: note 84275 added to function.memcache-get
Groups: php.notes 
Request: Send a blank email to php-notes+get-141239@lists.php.net to get a copy of this message
If deserialization fails for some reason, that is when memcache server returned flag 1 set, but the value was not a correctly serialized PHP data, then Memcache::get acts in a following way: If it was called with a single key to retrieve, then a warning is raised, but since it was not actually a bug of a server, the warning says something confusing like "Memcached Server Error: null" and the function returns bool(false). If it was called by passing an array (even with a single element in it), then the warning is not raised and the resulting array contains a value bool(false). Since there are some buffer overrun bugs present in Memcached Server, which from time to time cause overwriting of [part of] data and therefore rendering it impossible to deserialize, make sure to check if the result of Memcache::get contains only string, or deserialized structure. If the result is bool,dobule or long, then something went wrong. ---- Server IP: 82.160.94.10 Probable Submitter: 217.153.66.146 ---- Manual Page -- http://www.php.net/manual/en/function.memcache-get.php Edit -- https://master.php.net/note/edit/84275 Del: integrated -- https://master.php.net/note/delete/84275/integrated Del: useless -- https://master.php.net/note/delete/84275/useless Del: bad code -- https://master.php.net/note/delete/84275/bad+code Del: spam -- https://master.php.net/note/delete/84275/spam Del: non-english -- https://master.php.net/note/delete/84275/non-english Del: in docs -- https://master.php.net/note/delete/84275/in+docs Del: other reasons-- https://master.php.net/note/delete/84275 Reject -- https://master.php.net/note/reject/84275 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#141239) next »