[magento] Could not determine temp directory, please specify a cache_dir manually
magento version: 1.5.1
OS: CentOS 5.2
Server: Apache 2.X
MySQL: 5.X
After i uploaded the code and installed magento, it seems that it is running well. But when i visit http://www.mywebsite.com/index.php/admin/catalog_product/index/key/cbe2b4d77f0b3b97de24c4a43443458e/ , i get this error:
Could not determine temp directory, please specify a cache_dir manually
Thanks to google, finally i found the solution.
Open lib/Zend/Cache/Backend/File.php,
change these code from:
protected $_options = array(
'cache_dir' => 'null',
to:
protected $_options = array(
'cache_dir' => '/tmp',
then it is ok now.
Have fun with magento!