note 48525 rejected from ref.memcache by nlopess

From: Date: Tue, 28 Dec 2004 20:29:46 +0000
Subject: note 48525 rejected from ref.memcache by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-82417@lists.php.net to get a copy of this message
Note Submitter: leb at inbox dot ru ---- Error in MemCachedClient.inc.php Release 1.0.10 The script fall down in case of data end sign ( /r/nEND/r/n ) be at edge of 2 block. But the following condition must be meeted: last /n is only symbol of last block ($line="\n"). In this case next expression donn`t allow perform end sign checking: // skip over the extra return or newline if($line == "\r" || $line == "\n") continue; $bytes_read += strlen($line); $buf .= $line; // we read the all of the data, take in account // for the /r/nEND/r/n if($bytes_read == ($len + 7)) { $end = substr($buf, $len+2, 3); ................................................... Example of code, that result fall down: require_once('system/MemCachedClient.inc.php'); $options["servers"] = array("127.0.0.1:11212"); $options["debug"] = false; $options["compress"] = 0; $memc = new MemCachedClient($options); $str = str_repeat('1', 994); $memc->set('key', $str); echo $memc->get('key'); // here script fall

« previous php.notes (#82417) next »