Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1998 from skunkbad/develop

Better debugging for DB Cache path
  • Loading branch information...
commit 20209d691062afe24ccc7887857618fbddecaa8c 2 parents 878c4bd + 4a18c95
@narfbg narfbg authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 system/database/DB_cache.php
View
12 system/database/DB_cache.php
@@ -95,12 +95,22 @@ public function check_path($path = '')
? 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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.