• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed  Could not determine temp directory

#1
I'm getting the following error on install

Server Error

Could not determine temp directory, please specify a cache_dir manually
  1. Zend_Cache::throwException() in F:/Web Root/xeneight/library/Zend/Cache/Backend.php at line 197
  2. Zend_Cache_Backend->getTmpDir() in F:/Web Root/xeneight/library/Zend/Cache/Backend/File.php at line 123
  3. Zend_Cache_Backend_File->__construct() in F:/Web Root/xeneight/library/Zend/Cache.php at line 153
  4. Zend_Cache::_makeBackend() in F:/Web Root/xeneight/library/Zend/Cache.php at line 94
  5. Zend_Cache::factory() in F:/Web Root/xeneight/library/XenForo/Application.php at line 513
  6. XenForo_Application->loadCache()
  7. call_user_func_array() in F:/Web Root/xeneight/library/XenForo/Application.php at line 706
  8. XenForo_Application->lazyLoad() in F:/Web Root/xeneight/library/XenForo/Application.php at line 736
  9. XenForo_Application::get() in F:/Web Root/xeneight/library/XenForo/Model.php at line 146
  10. XenForo_Model->_getCache() in F:/Web Root/xeneight/library/XenForo/Model/DataRegistry.php at line 158
  11. XenForo_Model_DataRegistry->set() in F:/Web Root/xeneight/library/XenForo/Model/Cron.php at line 393
  12. XenForo_Model_Cron->updateMinimumNextRunTime() in F:/Web Root/xeneight/library/XenForo/Model/Cron.php at line 568
  13. XenForo_Model_Cron->importCronEntriesAddOnXml() in F:/Web Root/xeneight/library/XenForo/Model/Cron.php at line 504
  14. XenForo_Model_Cron->importCronDevelopmentXml() in F:/Web Root/xeneight/library/XenForo/CacheRebuilder/ImportMasterData.php at line 35
  15. XenForo_CacheRebuilder_ImportMasterData->rebuild() in F:/Web Root/xeneight/library/XenForo/ControllerHelper/CacheRebuild.php at line 26
  16. XenForo_ControllerHelper_CacheRebuild->rebuildCache() in F:/Web Root/xeneight/library/XenForo/Install/Controller/Install.php at line 243
  17. XenForo_Install_Controller_Install->actionStep2b() in F:/Web Root/xeneight/library/XenForo/FrontController.php at line 303
  18. XenForo_FrontController->dispatch() in F:/Web Root/xeneight/library/XenForo/FrontController.php at line 132
  19. XenForo_FrontController->run() in F:/Web Root/xeneight/install/index.php at line 17
 

Deceptor

Active member
#7
File: library\Zend\Cache\Backend\File.php
Line:
Code:
        'cache_dir' => null,
To:
Code:
        'cache_dir' => 'C:\php532\cache',
Change the path to w/e you like :)
 

Mike

XenForo developer
Staff member
#9
You really should do that with php.ini. Try doing an upload - does it work? If not, you really need the upload_tmp_dir.
 

ENF

Well-known member
#11
Couple of notes after Mike's comment:

PHP 5.3.3 / IIS 6 / FastCGI

Fresh configuration on a new server, resulted in the error noted in this thread.

I had to configure the PHP.INI correctly with the upload_tmp_dir variable and assure that the rights were set correctly.

After doing this, the install continued successfully. (Without editing XenForo files)
 

Mike

XenForo developer
Staff member
#13
Have a fix for this now, though the upload_tmp_dir change is probably preferable. (As if you get this error, without it, I suspect uploads will fail.)
 

mikoo

Active member
#18
... I finally fixed the problem for me. In case anyone might have the same problem, this could possibly help you, too:

Open this file:

lib/zend/cache/backend/file.php

Alter this file as follows:

old:

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

new:

protected $_options = array(
'cache_dir' => '/tmp',
 
#19
... I finally fixed the problem for me. In case anyone might have the same problem, this could possibly help you, too:

Open this file:

lib/zend/cache/backend/file.php

Alter this file as follows:

old:

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

new:

protected $_options = array(
'cache_dir' => '/tmp',
Thanks! Worked for me too.:D
 

erich37

Well-known member
#20
I am also getting this issue with "php.ini" and "upload_tmp_dir" an XF-installations.

So I have to contact the hosting-company each time to set this configuration for the php.ini for me, as I can not access the php.ini myself.

For Beta2 this is being fixed ?