From f717af46f6ddde60a77e17f7440c12ef0b6c529f Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Mon, 14 Mar 2016 13:18:39 +0500 Subject: UNIX socket check --- system/libraries/Cache/drivers/Cache_redis.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 29f43ba6f..b55d8bf25 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -104,6 +104,11 @@ class CI_Cache_redis extends CI_Driver try { + if ($config['host']{0} === '/') + { + $config['port'] = 0; // for unix domain socket + } + if ( ! $this->_redis->connect($config['host'], $config['port'], $config['timeout'])) { log_message('error', 'Cache: Redis connection failed. Check your configuration.'); -- cgit v1.2.3-24-g4f1b