Magento admin throws an exception:
Could not determine temp directory, please specify a cache_dir manually
It is fresh instalation on new hosting package.
Magento admin throws an exception:
Could not determine temp directory, please specify a cache_dir manually
It is fresh instalation on new hosting package.
Usually it will happen in shared web hosting, but also some times on individual server, if the permission of tmp folder is set wrong.
Many people suggest to modify the file:
/lib/Zend/Cache/Backend/File.php
to fix this problem. However, it may be a trap when you upgrade your Magento, as this file resides as core file of Magento. I recommend to use Magento's override feature.Firstly, copy
/lib/Zend/Cache/Backend/File.php
to/app/code/local/Zend/Cache/Backend/File.php
.Then on line 91 or near this line, you will find:
Change to:
You can change the cache folder wherever you want. Now create a directory named tmp(or whatever name you have given above) under var folder and change the permission to 777 if necessary.
tmp
folder in root of your magento installation with 777 permissions.lib/Zend/Cache/Backend/File.php
$_options
property and change line:'cache_dir' => null
, to'cache_dir' => 'tmp'
,This is only the permission issue. Just set the 777 permission to the cache directory and you are all done. try it.
For more details you can follow the link.
When ever you set the permission be sure it is recurrsively set..
chmod 777 -R /var/cache
this is the function
defined in file lib/Zend/Cache/Backend.php
http://www.webtechnologycodes.com/magento-error-could-not-determine-temp-directory-please-specify-a-cache_dir-manually/
Create an
info.php
and check for the path beneathupload_tmp_dir
to be writable for the webserver.Otherwise set the path in your hosting environment. Beware that this setting can not be placed within
.htaccess
files but some hosters allow individualphp.ini
files to be placed in yourdocroot
: