Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Better debugging for DB Cache path

  • Loading branch information...
commit 51c0b55a235ebcac022d6f5576c209edf98c38fe 1 parent 878c4bd
Brian Gottier 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', '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', '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.