Fixed  Could not determine temp directory

z3r010

Member
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
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
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
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)
 

Two Worlds

Member
I created a tmp/ folder an set permittions to 777.

I solved this by adding this line to my php.ini:

upload_tmp_dir = "/absolut/path/to/tmp/dir/with/slash/"
Now everything works fine !
 

Mike

XenForo developer
Staff member
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
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.)
... still getting the mistake. Did you fix the problem by now?
 

Luciano

Member
I get this errorduring install on a shared server where I have no access to the php.ini..
Any suggestions?
Luc
 

Mike

XenForo developer
Staff member
There are changes for beta 2 for this, but they are significant.
 

mikoo

Active member
There are changes for beta 2 for this, but they are significant.
... is there a chance beta 2 will be released soon? Fiddling around with the code is not really one of my favourite games :rolleyes:.

Many thanks in advance...
 

mikoo

Active member
... 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',
 

Boofhead

Member
... 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
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 ?
 
Top