Bug Report #3063

RecursiveDirectoryIterator error when using file cache

Added by Deon George about 4 years ago. Updated about 3 years ago.

Status:ClosedStart date:07/12/2010
Priority:NormalDue date:
Assignee:Sam de Freyssinet% 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

#1 Updated by Tiger SEO almost 4 years ago

Same bug. I digged some and found that it works only if 86 line instead UnexpectedValueException write Exception.
PHP 5.2.14

#2 Updated by Isaiah DeRose-Wilson almost 4 years ago

  • Assignee set to Sam de Freyssinet

I'm guessing this is caused by #3021

#3 Updated by Woody Gilk almost 4 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

#4 Updated by Woody Gilk almost 4 years ago

  • Target version set to v3.0.9

#5 Updated by Sam de Freyssinet over 3 years ago

  • Status changed from New to Resolved
  • Resolution set to fixed

#6 Updated by Sam de Freyssinet over 3 years ago

  • % Done changed from 0 to 90

#7 Updated by Woody Gilk over 3 years ago

  • Target version changed from v3.0.9 to v3.0.10

#8 Updated by Jeremy Bush over 3 years ago

  • Target version changed from v3.0.10 to v3.0.11

#9 Updated by Jeremy Bush about 3 years ago

  • Target version changed from v3.0.11 to v3.0.12

#10 Updated by Sam de Freyssinet about 3 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 90 to 100

Also available in: Atom PDF