SEP 27 2015

Magento :: “Could not determine temp directory, please specify a cache_dir manually”

Symptoms

Magento throws “There has been a problem processing your request” error.
The following error is logged under var/reports/ or shown on any page:

a:5:{i:0;s:71:"Could not determine temp directory, please specify a cache_dir manually";i:1;s:3597:"#0 lib/Zend/Cache/Backend.php(217): Zend_Cache::throwException('Could not deter...')
#1 lib/Zend/Cache/Backend/File.php(130): Zend_Cache_Backend->getTmpDir()

Cause

Magento can not write cache to var/cache/ and var/tmp/ folders under Magento root directory. Either the directories do not exist or webserver can not write to these directories.

Solution

  • Make sure that var/cache/ and var/tmp/ folders exist under Magento root directory. If you can not find it, simply create it anew
  • If the directory var/cache or var/tmp/exists but is not writable, change the permissions on that directory to allow webserver to write there. Typically, 0750 permissions should be sufficient. If it does not work, try a bit loose permissions0770 or even 0777. Note, that with the later you allow anyone to write into that directory, so be careful, especially if you are on a shared host, and consult with your hosting support for correct permissions to allow webserver to write there.
  • If steps above did not help, disable Magento Cache at System > Cache Management until the problem is solved and submit a ticket to your hosting support, requesting them to allow webserver to write into var/cache/ and var/tmp/ folders under Magento root directory.

Posted in: Troubleshooting

Magento :: “Could not determine temp directory, please specify a cache_dir manually”
2 votes, 3.42 avg. rating (74% score)