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

About the auth of new RedisCluster() by PHP7.0 ; How to achieve? #1355

Closed
kklingjie opened this issue May 22, 2018 · 6 comments
Closed

About the auth of new RedisCluster() by PHP7.0 ; How to achieve? #1355

kklingjie opened this issue May 22, 2018 · 6 comments

Comments

@kklingjie
Copy link

kklingjie commented May 22, 2018

Throw an exception:

PHP Warning: RedisCluster::__construct() expects at most 5 parameters, 6 given in /www/framework/cache/redis.php on line 79

the code :

$this->credis = new RedisCluster(null,$redis_connect_config,2,2,true,$password);

My redis auth is open;
How to achieve?

@yatsukhnenko
Copy link
Member

@kklingjie this functionality is not merged into any release. You can try compile and use changes from PR #1363

@peking2008
Copy link

peking2008 commented Jun 23, 2018

Throw an exception:
PHP Fatal error: Uncaught RedisClusterException: Couldn't map cluster keyspace using any provided seed in test.php
the code :
$obj_cluster = new RedisCluster(NULL, ['ip:6379', 1.5, 1.5]);

My redis auth is open;
How to achieve?

If redis auth is closed.
it is ok!

@yatsukhnenko
Copy link
Member

Try to change your code to
$obj_cluster = new RedisCluster(NULL, ['ip:6379'], 1.5, 1.5);

@peking2008
Copy link

peking2008 commented Jul 12, 2018

@yatsukhnenko
phpredis=4.0

change code to
$obj_cluster = new RedisCluster(NULL, ['ip:6379'], 1.5, 1.5);

still error

Fatal error: Uncaught RedisClusterException: Couldn't map cluster keyspace using any provided seed

========================================================
finally:
#1303
https://github.com/phpredis/phpredis/files/1698000/redis-3.1.6.zip

$obj_cluster = new RedisCluster(NULL, ['ip:6379'], 1.5, 1.5,0,'passwordstr')

seccess!

I hope phpredis source can support cluster authentication with password.

I'm sorry! My English is very poor!

@yatsukhnenko
Copy link
Member

This functionality is implemented in #1494

@yatsukhnenko
Copy link
Member

#1494 is merged into develop branch

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

No branches or pull requests

3 participants