php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69809 memcache get always modify flag parameter
Submitted: 2015-06-12 09:50 UTC Modified: 2021-03-25 16:38 UTC
From: bburnichon at gmail dot com Assigned: cmb (profile)
Status: Closed Package: memcache (PECL)
PHP Version: 5.5.26 OS: Mac OS X
Private report: No CVE-ID: None
 [2015-06-12 09:50 UTC] bburnichon at gmail dot com
Description:
------------
In an application I'm in charge of, some booleans are cached, The only way to know whether false returned is an actual hit is to check whether the flag value was changed.

It works perfectly on a vagrant debian 7 but not in native OSX installation.

memcache

memcache support => enabled
Active persistent connections => 0
Version => 2.2.7
Revision => $Revision: 327750 $

Directive => Local Value => Master Value
memcache.allow_failover => 1 => 1
memcache.chunk_size => 8192 => 8192
memcache.default_port => 11211 => 11211
memcache.default_timeout_ms => 1000 => 1000
memcache.hash_function => crc32 => crc32
memcache.hash_strategy => standard => standard
memcache.max_failover_attempts => 20 => 20


Test script:
---------------
$memcache = new Memcache();
$memcache->connect('localhost', 11211);
$memcache->flush();
$flag = null; var_dump($memcache->get('foo', $flag), $flag);


Expected result:
----------------
bool(false)
NULL

Actual result:
--------------
bool(false)
int(0)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-25 16:38 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-03-25 16:38 UTC] cmb@php.net
The official bug tracker for PECL/memcache is now at
<https://github.com/websupport-sk/pecl-memcache/issues>.

So, if this is still an issue with either of the current memcache
versions (4 or 8), please file an issue there.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 16:01:27 2024 UTC