Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

cache_dir must be a directory
 
brightbox
Jr. Member
 
Total Posts:  2
Joined:  2008-09-10
 

I have searched all forums looking for a solution for this and nothing has worked.

I installed magento using ssh and I can’t get to the install page. I have tried deleted the cache folder recreating it and changing permissions from 777 to 775 vice versa. So far no luck.This is my error. Please help

There was a problem proceeding with Magento installation.

Please contact developers with error messages on this page.

cache_dir must be a directory

#0 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Zend/Cache/Backend/File.php(146): Zend_Cache::throwException(’cache_dir must ...’)
#1 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Zend/Cache/Backend/File.php(121): Zend_Cache_Backend_File->setCacheDir(’/var/www/vhosts...’)
#2 /var/www/vhosts/elevateprinting.com/httpdocs/lib/Zend/Cache.php(124): Zend_Cache_Backend_File->__construct(Array)
#3 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Model/App.php(892): Zend_Cache::factory(’Core’, ‘File’, Array, Array)
#4 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Model/Locale.php(71): Mage_Core_Model_App->getCache()
#5 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Model/Config.php(715): Mage_Core_Model_Locale->__construct(Array)
#6 /var/www/vhosts/elevateprinting.com/httpdocs/app/Mage.php(287): Mage_Core_Model_Config->getModelInstance(’core/locale’, Array)
#7 /var/www/vhosts/elevateprinting.com/httpdocs/app/Mage.php(301): Mage::getModel(’core/locale’, Array)
#8 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Model/App.php(733): Mage::getSingleton(’core/locale’)
#9 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Model/Translate.php(324): Mage_Core_Model_App->getLocale()
#10 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Model/Translate.php(164): Mage_Core_Model_Translate->getLocale()
#11 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Model/Translate.php(107): Mage_Core_Model_Translate->setConfig(Array)
#12 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Model/App/Area.php(139): Mage_Core_Model_Translate->init(’install’)
#13 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Model/App/Area.php(114): Mage_Core_Model_App_Area->_initTranslate()
#14 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Model/App/Area.php(86): Mage_Core_Model_App_Area->_loadPart(’translate’)
#15 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Model/App.php(511): Mage_Core_Model_App_Area->load()
#16 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(377): Mage_Core_Model_App->loadArea(’install’)
#17 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Install/controllers/IndexController.php(35): Mage_Core_Controller_Varien_Action->preDispatch()
#18 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(336): Mage_Install_IndexController->preDispatch()
#19 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(144): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#20 /var/www/vhosts/elevateprinting.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(168): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#21 /var/www/vhosts/elevateprinting.com/httpdocs/app/Mage.php(420): Mage_Core_Controller_Varien_Front->dispatch()
#22 /var/www/vhosts/elevateprinting.com/httpdocs/index.php(46): Mage::run()
#23 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
mmuziek
Jr. Member
 
Total Posts:  5
Joined:  2010-03-27
 

make a tmp dir in the root of the magento installation
that solved it for me

 
Magento Community Magento Community
Magento Community
Magento Community
 
youngcow
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2008-02-14
 
mmuziek - 09 August 2010 12:14 PM

make a tmp dir in the root of the magento installation
that solved it for me

This worked. Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NaveenRahul
Jr. Member
 
Total Posts:  26
Joined:  2010-05-12
 

Thanks thats realyy solved my problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
curious_concepts
Jr. Member
 
Total Posts:  3
Joined:  2011-03-03
 

thanks alot! that save my life

 
Magento Community Magento Community
Magento Community
Magento Community
 
Eduardo Bertolucci
Jr. Member
 
Total Posts:  2
Joined:  2009-01-26
 

Obrigado, resolveu meu problema.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ebuntu
Sr. Member
 
Avatar
Total Posts:  245
Joined:  2010-06-16
Denver, CO
 

I suggest you create and place the “temp” sub-directory in the MAGENTO/var directory. Here is how: http://servertune.com/kbase/entry/401/

 
Magento Community Magento Community
Magento Community
Magento Community
 
webkul
Sr. Member
 
Avatar
Total Posts:  159
Joined:  2010-10-27
 

Hope this will help Magento : cache_dir must be a directory

 
Magento Community Magento Community
Magento Community
Magento Community
 
suppapac
Jr. Member
 
Total Posts:  1
Joined:  2012-06-14
 

tmp dir It’s work!!!

Thank you very much smilesmile

 
Magento Community Magento Community
Magento Community
Magento Community
 
zeshan-Khattak
Jr. Member
 
Total Posts:  2
Joined:  2010-08-09
 

Create ‘tmp’ directory under root directory really worked for me. Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hallan
Jr. Member
 
Total Posts:  4
Joined:  2010-05-04
 

I created a subdirectory to a new website and had received this message about cache_dir. I followed the instructions and then created a /tmp directory inside this subdirectory I had created before. It works!

 
Magento Community Magento Community
Magento Community
Magento Community
 
DRaji
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2013-03-17
 

This problem came generally when you move your code to another host or server . There are mainly two solution for this problem

Make sure your cache directory is writable or you can make writable to var folder of magento

but sometimes this situation does not work so here is the alternate solution. Go to this location lib/Zend/Cache/Backend/ and open file.php file you’ll see the code something like this

protected $_options = array(
        
'cache_dir' => null,
        
'file_locking' => true,
        
'read_control' => true,
        
'read_control_type' => 'crc32',
        
'hashed_directory_level' => 0,
        
'hashed_directory_umask' => 0700,
        
'file_name_prefix' => 'zend_cache',
        
'cache_file_umask' => 0600,
        
'metadatas_array_max_size' => 100
    
);

change this code as below

protected $_options = array(
        
'cache_dir' => '/var/www/html/webkul/magento/tmp',
        
'file_locking' => true,
        
'read_control' => true,
        
'read_control_type' => 'crc32',
        
'hashed_directory_level' => 0,
        
'hashed_directory_umask' => 0700,
        
'file_name_prefix' => 'zend_cache',
        
'cache_file_umask' => 0600,
        
'metadatas_array_max_size' => 100
    
);

assign path of cache_dir as per your configuration .

 
Magento Community Magento Community
Magento Community
Magento Community
 
nimit8989
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2012-02-21
 

Solved this error in magento 1.7

Create tmp folder in root and change file.php into /public_html/lib/Zend/Cache/Backend
change this line 91.

protected $_options = array(
        
'cache_dir' => null,

to

protected $_options = array(
        
'cache_dir' => 'tmp/',
 
Magento Community Magento Community
Magento Community
Magento Community
 
tpcweb
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2012-04-09
 

Im having a similar issue, only i have multiple stores useing the subdirectory method

I have a main website store and several other websites(stores) in sub directories.

Sub directory websites:
theprintingco.biz/tg/tgmissouri
theprintingco.biz/tg/tgindiana
etc..

Here is the error im getting for my sub directory stores when a click on a configurable product:
http://theprintingco.biz/tg/tgmissouri/index.php/apparel/shirts/zolof-the-rock-and-roll-destroyer-lol-cat-t-shirt.html

I fixed this error for the main website(theprintingco.biz/tg) by making a temp folder in the root folder and changing the file.php(theprintingco.biz/tg/lib/zend/cache/backend/) to point at the temp folder(theprintingco.biz/tg/temp).

I’m not sure what needs to be done to fix this since the other websites only have two files(.htaccess & index.php) in them.

I’m also noticing there is no formatting for the error pages.

If anyone has had any experience with this issue please let me know.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top