summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorMasterklavi <masterklavi@gmail.com>2016-03-14 09:18:39 +0100
committerMasterklavi <masterklavi@gmail.com>2016-03-14 09:18:39 +0100
commitf717af46f6ddde60a77e17f7440c12ef0b6c529f (patch)
tree2e337a63e69a935210e4b149d490005def9336f9 /system/libraries
parent6047ec16b2a99b3c19d452b07b81be9df8d2ad78 (diff)
UNIX socket check
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Cache/drivers/Cache_redis.php5
1 files changed, 5 insertions, 0 deletions
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.');