★ wanayoo — archive 1999 https://github.com/phpredis/phpredis/issues/301Nouvelle recherche | Portail wanayoo
Skip to content
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

config('GET', '*') with igbinary creates a warning #301

Closed
quentin389 opened this issue Feb 15, 2013 · 4 comments
Closed

config('GET', '*') with igbinary creates a warning #301

quentin389 opened this issue Feb 15, 2013 · 4 comments

Comments

@quentin389
Copy link

@quentin389 quentin389 commented Feb 15, 2013

$redis = new Redis();
$redis->connect('mem-property');
$redis->setOption(Redis::OPT_SERIALIZER, $serializer);
$config = $redis->config('GET', '*');
var_dump($config);

Using Redis::SERIALIZER_NONE or Redis::SERIALIZER_PHP returns correct result (an array with config options).

Using Redis::SERIALIZER_IGBINARY shows a series of warnings and then returns the correct result. The warnings are:
Warning: igbinary_unserialize_header: unsupported version: 1685417328, should be 1 or 2
Warning: igbinary_unserialize_header: unsupported version: 796287346, should be 1 or 2
and so on

At least that's what happens on my machine.

@michael-grunder
Copy link
Member

@michael-grunder michael-grunder commented Feb 15, 2013

Interesting. I'll see if I can replicate it for you

@dfaust
Copy link

@dfaust dfaust commented Jul 26, 2014

I encountered the same problem after switching to igbinary.
I'm using phpredis 2.2.5, redis 2.6.14 and igbinary 1.2.0.

The warning seems to depend on which config options I'm trying to get.
I wrote a small script that loops through all config options and prints the name and value and then tries to retrieve it again so you can see which config options make trouble.
http://pastebin.com/datzx0CM

@parf
Copy link

@parf parf commented Oct 1, 2014

have same problem:
fedora 20

rpm -qa | egrep 'igbinary|pecl-redis|php-5'
php-pecl-redis-2.2.5-3.fc20.remi.5.6.x86_64
php-pecl-igbinary-1.2.1-1.fc20.remi.5.6.x86_64
php-5.6.0-1.fc20.remi.x86_64

so far workaround is:
// serialization conflict
function config($what, $mask) {
$this->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_NONE);
$r = parent::config($what, $mask);
$this->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_IGBINARY);
return $r;
}

redis 2.8.13

@michael-grunder
Copy link
Member

@michael-grunder michael-grunder commented Aug 29, 2017

Closed via #761

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.