|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-09-10 12:36 UTC] konstantin at symbi dot org
Description:
------------
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"The lowest two bytes of the flags array is reserved for
pecl/memcache internal use");
On 64 bit systems, warning is raised when it should not
Reproduce code:
---------------
Reproduce code:
$memcache->set('x', 'v', 64);
Patch:
--- memcache-3.0.4/memcache_pool.c.orig 2010-09-10 20:25:20.108394357 +0400
+++ memcache-3.0.4/memcache_pool.c 2010-09-10 20:26:23.568393739 +0400
@@ -349,7 +349,7 @@
int mmc_pack_value(mmc_pool_t *pool, mmc_buffer_t *buffer, zval *value, unsigned int *flags TSRMLS_DC) /*
does serialization and compression to pack a zval into the buffer {{{ */
{
- if (*flags & 0xffff & ~MMC_COMPRESSED) {
+ if ((*flags >> 2 << 2) != *flags) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The lowest two bytes of the flags array is reserved for pecl/memcache internal use");
return MMC_REQUEST_FAILURE;
}
Expected result:
----------------
no error
Actual result:
--------------
"The lowest two bytes of the flags array is reserved for
pecl/memcache internal use" warning
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 13:00:01 2025 UTC |
The following works fine for me: $memcache = new Memcache; $memcache->addServer('localhost', 11211); $memcache->set('x', 'v', MEMCACHE_COMPRESSED); $memcache->set('x', 'v'); What are you trying to do with the "64" value the set() method? Is that supposed to be the timeout?