Redis session driver broken - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: Redis session driver broken (/showthread.php?tid=64219) |
Redis session driver broken - spjonez - 01-28-2016 Code: A PHP Error was encountered Code: $config['sess_driver'] = 'redis'; I'm assuming timeout should be set in this block? Code: elseif (preg_match('#(?:tcp://)?([^:?]+)(?:\:(\d+))?(?<options>\?.+)?#', $this->_config['save_path'], $matches)) RE: Redis session driver broken - Narf - 01-28-2016 Line 148 in that file is, and always has been (in released versions) a return statement. I guess you're using an old dev version. RE: Redis session driver broken - spjonez - 01-29-2016 I'm using the latest code from Git. https://github.com/bcit-ci/CodeIgniter/blob/develop/system/libraries/Session/drivers/Session_redis_driver.php construct method, line 148 references $this->_config['save_path']['timeout'] which is not defined with the other keys in construct. RE: Redis session driver broken - Nichiren - 07-18-2016 I came across the same "Undefined index: timeout" error in line 155 of Session_redis_driver.php after updating my system files to the latest CI version 3.1.0-dev today. The quick fix for me was to explicitly set the timeout value in sess_save_path since the code assumes timeout is set: $config['sess_save_path'] = 'tcp://127.0.0.1:6379?timeout=0'; RE: Redis session driver broken - Narf - 07-19-2016 3.1.0-dev is NOT the latest code and it is UNSTABLE. Don't use it. RE: Redis session driver broken - Narf - 07-19-2016 https://github.com/bcit-ci/CodeIgniter/commit/e12fcec770d7bc03f746c291e96cc75b51475f74 |