-
Notifications
You must be signed in to change notification settings - Fork 327
Memcached corrupting JSON encoded data #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We noticed this very same problem. |
i'm having the same issue with PHP serialized data. A workaround: |
we found a potential bug in decompress path. and the PR works for us so far. please try and see if the fix works for you |
@wetcoast @arisro @ftzdomino could you try if the PR #252 works for you? |
works for us. thanks! |
Works fine for us too! Thank you so much for the fix @dictcp. One step closer to the PHP7 version release. :) I want to also add that we upgraded our production to php7, using the packages from Ondrej's repo. We used as a workaround for this (we are json_encoding only one key) doing a utf8_encode() when fetching from memcached, before json_decoding. |
fix #250: non-null-terminated zend_string in s_decompress_value
Uh oh!
There was an error while loading. Please reload this page.
Problem
Running the following sample code, json_decoding the memcached value results in the following JSON error messages:
The error message generated cycles through the above list once the JSON encoded string is larger than 2000 characters.
No error messages are generated by just JSON encoding and decoding directly. The only time errors occur is when the value being decoded is retrieve from memcache.
Sample code
PHP Version
Memcached Config
Memcache Server Version
The text was updated successfully, but these errors were encountered: