Codeigniter: CI SESSION use redis cluster

Created on 9 Apr 2016  Â·  2Comments  Â·  Source: bcit-ci/CodeIgniter

sorry,My englisth is so poor。
Now,I want to put the session to redis.
I use the php-redis extension.
when I use the single-instance , I change the config.php to
$config['sess_driver'] = 'redis'; $config['sess_save_path'] = '127.0.0.1:6379';

it works ok.

next,the problem.
I have two server , I want to use the redis cluster . I set the cluster OK.
I use the next code to test it
<?php $redis = new RedisCluster(NULL, Array('127.0.0.1:6380')); $redis->set('test','test'); echo $redis->get('test'); ?>
and I put key value from one server,and I can get the value from other server.so the cluster is OK.

But how change the config.php to connect to redis cluster? I have tried a variety of methods,it not work.The error message is
Warning: Failed to write session data (user). Please verify that the current setting of session.save_path is correct
what can I do? Is CI support redis cluster?
Thank you very much for your help!

Most helpful comment

No, we don't support Redis clusters.

This is a bug tracker. In the future, please post your questions on our forums instead.

All 2 comments

No, we don't support Redis clusters.

This is a bug tracker. In the future, please post your questions on our forums instead.

@narfbg thank you very much. I am very happy that you can understand my question. hahahahaha.
now, i put my session to the db.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Struki84 picture Struki84  Â·  7Comments

cyberhck picture cyberhck  Â·  5Comments

monski picture monski  Â·  4Comments

anharku picture anharku  Â·  3Comments

it-can picture it-can  Â·  5Comments