Jump to:

4938 Posts in 16484 Topics by 1490 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Uncaught Zend_Cache_Exception: cache_dir must be a directory

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

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

Page: 1 2 3 4 5
Go to End
Author Topic: 22912 Views
  • quiet_islander
    Avatar
    Community Member
    17 Posts

    Re: Uncaught Zend_Cache_Exception: cache_dir must be a directory Link to this post

    I get the same error whenever I try to log in to the CMS. There are no problems when I am on the front end.
    In my case, the line 90 originally read 'cache_dir' => null. If I change it to another directory( for example "../silverstripe-cache/") which does exist on the server, I can open the CMS in my current browser successfully. However, as long as I close the browser and open the site again or simply open the site in another browser, I get stuck at CMS loading page. I have firebugs installed so I checked the errors. There are 13 of them and they are mostly about missing important javascript files. Any ideas? I have getting insane about the problem for 3 days already!

  • turtleline
    Avatar
    Community Member
    6 Posts

    Re: Uncaught Zend_Cache_Exception: cache_dir must be a directory Link to this post

    I have just experienced this "Uncaught Zend_Cache_Exception: cache_dir must be a directory" error on a site we upgraded to 2.4.0 a while back. Has been a while since we tried to log into admin.

    After a bit of going around in circles was lead to the solution which has worked for me adding a line to /sapphire/_config.php outlined here:
    http://open.silverstripe.org/changeset/105468

  • quiet_islander
    Avatar
    Community Member
    17 Posts

    Re: Uncaught Zend_Cache_Exception: cache_dir must be a directory Link to this post

    @turtleline: Thanks but I still get stuck and receive javascript errors when trying to log in.

    However, I have found something interesting. I can make the log in work by adding "?isDev=1" at end of the url. Without that I will get stuck at the CMS log in page. Anyone got an idea?

  • LinseyM
    Avatar
    Community Member
    99 Posts

    Re: Uncaught Zend_Cache_Exception: cache_dir must be a directory Link to this post

    I got this error today on a clean install of 2.4.0 in a linux box.

    I could view site pages but trying to access "/admin" threw the error up.

    I fixed it by following one of the prevoius support ticket links and adding a line of code to "_config.php":

    // Zend_Cache temp directory setting
    $_ENV['TMPDIR'] = TEMP_FOLDER;

    No idea exactly what it does, but it worked for me so thought I'd just pass it on!

    Linsey

  • atticusservices
    Avatar
    Community Member
    10 Posts

    Re: Uncaught Zend_Cache_Exception: cache_dir must be a directory Link to this post

    @quiet_islander

    Regarding the problem of the cms not loading without isDev ... This sounds like the same problem I was having. It had to do with the javascript combine_files feature of silverstripe. If you open your browser's error console you should see a bunch of javascript errors.

    My fix (while not so elegant) did worked, however someone else made a recommendation for a better solution but I have not tried it yet.

    http://silverstripe.org/general-questions/show/286086

  • atticusservices
    Avatar
    Community Member
    10 Posts

    Re: Uncaught Zend_Cache_Exception: cache_dir must be a directory Link to this post

    @turtleline & @LinseyM

    Thanks. This sounds like a much better solution than the one I previously suggested as it doesn't involved editing the thirdparty extension.

  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: Uncaught Zend_Cache_Exception: cache_dir must be a directory Link to this post

    Well, comments like the above comment is THE reason we need a report button ...

  • tazzydemon
    Avatar
    Community Member
    122 Posts

    Re: Uncaught Zend_Cache_Exception: cache_dir must be a directory Link to this post

    I am guessing this happens on Linux installs.

    Its a permissions issue. On my centos/virtualmin server when running apache in mod_php mode the files created by the application are owned by one user whereas the server is of course apache. I compounded the issue by being forced to change halfway from mod_fcigd to mod_php because the installer did not see mod_rewrite working in mod_fcgid (it was and now I have changed back and thats another issue)

    Just go to /tmp and then chmod -R g+w silverstripe-cache-whatever-your-path-is

    Failing that then open up the permissions on /tmp

    You might then want to reinstall the app if thats where it failed.

    Julian

    22912 Views
Page: 1 2 3 4 5
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.