I have installed Magento 2.0.0.0 on Windows with IIS 8. When I try to add a new product I get a message:
"Could not determine temp directory, please specify a cache_dir manually"
When I click the 'Add Product' button anyway I don't get a data entry form that I would expect – it's mostly blank.
I have looked around at solutions, but they all seem to focus on versions earlier than 2.0.0.0 (e.g. this one applies to 1.8.1.0) and this is important because there is no app/code/core/Zend/Cache/Backend/ folder as described in that solution. There is however:
lib/internal/Cm/Cache/Backend and a File.php there. I have changed line 42 here to:
'cache_dir' => 'var/tmp/',
(Even though hacking away at the file in 'lib' doesn't feel right).
Still the message and problem persists.
Best Answer
This error is not Magento-specific. It relates to Zend Cache.
Set
sys_temp_dir
inphp.ini
to a path that can be reached by IUSR then restart IIS to apply changes.