★ wanayoo — archive 1999 https://github.com/phpredis/phpredis/pull/1280Nouvelle 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

the element of z_seeds may be a reference on php7 #1280

Merged
merged 1 commit into from Dec 6, 2017

Conversation

@janic716
Copy link

janic716 commented Dec 6, 2017

yesterday i used RedisCluster connect my redis cluser, code like this:
$hosts = [
"10.1.15.22:7100",
"10.1.15.22:7101",
];
array_walk($hosts, function(&$val) {
$val = trim($val);
});
$rc = new RedisCluster(null, $hosts, null, null, true);

this code runs normally on php5.x but error on php7.x, error info is:
PHP Fatal error: Uncaught RedisClusterException: Couldn't map cluster keyspace using any provided seed in /opt/php/test.php:14
Stack trace:
#0 /opt/php/test.php(14): RedisCluster->__construct(NULL, Array, NULL, NULL, true)
#1 {main}
thrown in /opt/php/test.php on line 14

tracing the source code of phpredis, i found the element of ht_seeds is a referent in function cluster_init_seeds on php7.x environment.

i fixed this problem and re-compiled the redis extension, and the code runs normally on php7

yatsukhnenko added a commit that referenced this pull request Dec 6, 2017
@yatsukhnenko yatsukhnenko merged commit 4cf3414 into phpredis:develop Dec 6, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
yatsukhnenko added a commit that referenced this pull request Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.