Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upthe element of z_seeds may be a reference on php7 #1280
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
janic716 commentedDec 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