Wrong "memcache compressed flag" value

RESOLVED FIXED

Status

Cloud Services
Server: Sync
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: François Hodierne, Assigned: François Hodierne)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b12pre) Gecko/20110211 Firefox/4.0b12pre
Build Identifier: 

When using memcache in PHP, the compressed flag should be an integer, not a boolean. In some recent setups, when it's a boolean, PHP issue a warning error, which break the expected JSON output.

This can be easily fixed by using the MEMCACHE_COMPRESSED constant.

It seems this problem only appear with Memcache extension 3.0.3 and upper:
http://pecl.php.net/package-info.php?package=memcache&version=3.0.3


Reproducible: Always

Steps to Reproduce:
1. Install Firefox Sync PHP Server on Ubuntu 10.10 with default packages (php5, php5-memcache)
2. Get URL: http://example.com/firefox-sync/1.0/username/info/collections
Actual Results:  
PHP issue a Warning error:
The lowest two bytes of the flags array is reserved for pecl/memcache internal use


Expected Results:  
PHP should not issue any warning.
(Assignee)

Comment 1

7 years ago
Created attachment 512430 [details] [diff] [review]
Patch replacing 'true' boolean with MEMCACHE_COMPRESSED constant

Updated

7 years ago
Attachment #512430 - Flags: review?(telliott)

Updated

7 years ago
Assignee: nobody → znarfor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 512430 [details] [diff] [review]
Patch replacing 'true' boolean with MEMCACHE_COMPRESSED constant

Looks good. I'll check it in
Attachment #512430 - Flags: review?(telliott) → review+
fixed in http://hg.mozilla.org/services/sync-server/rev/1bf645926272
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.