summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-14 18:10:02 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-14 18:10:02 +0100
commit20209d691062afe24ccc7887857618fbddecaa8c (patch)
treec1963386ba4e99eafbd97061ad8209cd90b045e1
parent878c4bd45c8984b7e41e695cb216ccbba0e3473a (diff)
parent4a18c9505040f5b0fc1129ec7f167baeae016080 (diff)
Merge pull request #1998 from skunkbad/develop
Better debugging for DB Cache path
-rw-r--r--system/database/DB_cache.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php
index db7636450..fd01dc2d8 100644
--- a/system/database/DB_cache.php
+++ b/system/database/DB_cache.php
@@ -95,12 +95,22 @@ class CI_DB_Cache {
? rtrim(realpath($path), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR
: rtrim($path, '/').'/';
- if ( ! is_dir($path) OR ! is_really_writable($path))
+ if ( ! is_dir($path))
{
+ log_message('debug', 'DB cache path error: '.$path);
+
// If the path is wrong we'll turn off caching
return $this->db->cache_off();
}
+ if ( ! is_really_writable($path))
+ {
+ log_message('debug', 'DB cache dir not writable: '.$path);
+
+ // If the path is not really writable we'll turn off caching
+ return $this->db->cache_off();
+ }
+
$this->db->cachedir = $path;
return TRUE;
}