Bug Report #3063
RecursiveDirectoryIterator error when using file cache
| Status: | Closed | Start date: | 07/12/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | - | |||
| Target version: | Kohana v3.x - v3.0.12 | |||
| Resolution: | fixed | Points: |
Description
Hi, I get this error when using a the cache plugin:
ErrorException [ Warning ]: RecursiveDirectoryIterator::__construct(/mnt/hgfs/devel/myapp/application/cache/.kohana_cache) [recursivedirectoryiterator.--construct]: failed to open dir: No such file or directory
MODPATH/cache/classes/kohana/cache/file.php [ 84 ]
79 parent::__construct($config);
80
81 try
82 {
83 $directory = Arr::get($this->_config, 'cache_dir', APPPATH.Cache_File::CACHE_DIR);
84 $this->_cache_dir = new RecursiveDirectoryIterator($directory);
85 }
86 catch (UnexpectedValueException $e)
87 {
88 if ( ! mkdir($directory, 0777, TRUE))
89 {
(Line 84 is highlighted)
My directory exists, is writable and is empty
[deon@c5t61p application]$ ls -al /mnt/hgfs/devel/myapp/application/cache total 4 drwxrwxrwx 1 deon 119 4096 Jul 12 2010 . drwxr-xr-x 1 deon 119 4096 Jul 12 2010 ..
It seems that KH doesnt get to the "create" (the exception/cache processing) which creates the .kohana_cache directory in the cache dir. Manually creating the directory works fine.
I'm using KH 3.0.6.2, and using a call to $cache = Cache::instance('file'); immediately after the cache module has been included/enabled in bootstrap.php.
History
Updated by Tiger SEO over 2 years ago
Same bug. I digged some and found that it works only if 86 line instead UnexpectedValueException write Exception.
PHP 5.2.14
Updated by Isaiah DeRose-Wilson over 2 years ago
- Assignee set to Sam de Freyssinet
I'm guessing this is caused by #3021
Updated by Woody Gilk over 2 years ago
- Subject changed from ErrorException [ Warning ]: RecursiveDirectoryIterator::__construct(/mnt/hgfs/devel/agilebill/application/cache/.kohana_cache) [recursivedirectoryiterator.--construct]: failed to open dir: No such file or directory to RecursiveDirectoryIterator error when using file cache
Updated by Woody Gilk over 2 years ago
- Target version set to v3.0.9
Updated by Sam de Freyssinet over 2 years ago
- Status changed from New to Resolved
- Resolution set to fixed
Updated by Sam de Freyssinet over 2 years ago
- % Done changed from 0 to 90
Updated by Woody Gilk over 2 years ago
- Target version changed from v3.0.9 to v3.0.10
Updated by Jeremy Bush about 2 years ago
- Target version changed from v3.0.10 to v3.0.11
Updated by Jeremy Bush about 2 years ago
- Target version changed from v3.0.11 to v3.0.12
Updated by Sam de Freyssinet almost 2 years ago
- Status changed from Resolved to Closed
- % Done changed from 90 to 100