Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Installing SilverStripe

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Uncaught Zend_Cache_Exception: cache_dir must be a directory


33 Posts   23217 Views


25 May 2010 at 9:09pm Community Member, 51 Posts

@Atticus. Yes I do have permissions. Perhaps a fix for file.php is necessary?


25 May 2010 at 9:43pm Community Member, 51 Posts

@youigoul. Good to hear. Any idea when 2.4.1 will be released?


25 May 2010 at 10:13pm Community Member, 202 Posts

no. But perhaps the fix can already be used or download the trunk


26 May 2010 at 5:07am Community Member, 10 Posts

@j2 you could try changing the argument sent to setCacheDir() in file.php ... but that variable is currently being set by the construtor which is being set ultimately by getTmpDir() so it should be the same.


26 May 2010 at 9:41pm Community Member, 8 Posts

Google Summer of Code Hacker
47 posts Reply
Re: Uncaught Zend_Cache_Exception: cache_dir must be a directory
2 April 2010 at 4:31am

I ended up setting the cache_dir explicitly in /sapphire/thirdparty/Zend/Cache/Backend/File.php:90 to my silverstripe-cache directory.



27 May 2010 at 5:48am (Last edited: 27 May 2010 5:49am), Community Member, 51 Posts

@devsetshop. This one did the trick! Many thanks to you and to all other that suggested solutions.


27 May 2010 at 3:32pm Community Member, 22 Posts

Hi Xerra,

I'm having exactly the same problem, but still learning php - can you explain how to set the cache_dir explicitly in file.php ? Cant find anywhere else..



27 May 2010 at 8:27pm (Last edited: 27 May 2010 8:29pm), Community Member, 51 Posts

Open file /sapphire/thirdparty/Zend/Cache/Backend/File.php

Go to line 90. It will read 'cache_dir' => '/temp/',

If you have a windows environment change to something like

'cache_dir' => 'C:\temp\cache',

If you have a linux environment change to something like

'cache_dir' => '/xxx/xxx/xxxx',

You must have write access privileges to the directory you set.

I have a windows environment so I verify the solution works. For linux I can not. However, in theory, this should work. Any linux user out there correct me if I am wrong.

Hope this helps.