Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php memcached error

Every time I try to use the add() function for memcached, I get the following error:

A PHP Error was encountered

Severity: Warning

Message: MemcachePool::add(): The lowest two bytes of the flags array is reserved for pecl/memcache internal use

Filename: libraries/memcached_library.php

Line Number: 92

What could be wrong? I'm using this library for codeigniter: http://github.com/trs21219/memcached-library

like image 872
Matthew Avatar asked Nov 27 '22 18:11

Matthew


1 Answers

Are you on 64 bits? It looks like it's a recently found bug with pecl/memcache: http://pecl.php.net/bugs/bug.php?id=18567

It seems like it has to do with the compression flag. It can't be a boolean anymore, it needs to be an integer according to this source code

/**
 * The compressed argument on Memcache::add, Memcache::set and Memcache::replace takes
 * an integer not a boolean. Since pecl/memcache 3.0.3 booleans now leads to warnings like
 * The lowest two bytes of the flags array is reserved for pecl/memcache internal use
 */
like image 61
Fanis Hatzidakis Avatar answered Dec 06 '22 04:12

Fanis Hatzidakis