Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 3
Could not determine temp directory, please specify a cache_dir manually
 
irwan
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2008-12-20
Lille, France
 

@Aero Database: Thanks for your help. It works for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rawaby88
Jr. Member
 
Total Posts:  1
Joined:  2009-03-12
 

hi
i have the last version of magento 1.4.1.1
and this fix work for me without writing any codes
for me i create tmp folder inside ->>> yoursite/magento/tmp got the same error
so i create the second tmp folder in the root ->>> yoursite/tmp and this work for me

i hope this will help

btw this was the second time i make install for magento cause first time i had problem for upload photo and i did change my code like they said before , it work for me but i couldn’t upload photos

sorry for my english

have a good day

 
Magento Community Magento Community
Magento Community
Magento Community
 
Cristian Livadaru
Jr. Member
 
Total Posts:  7
Joined:  2008-04-11
 

This happened to me after moving my Magento Store from my dev domain to the production domain.
Unfortunately the Produciton server had php_safemode turned ON, Magento doesn’t like this and also complains during installation, but if you move a store you won’t notice any complain from magento ... except for these errors.
Turning php_safemode off fixed the problem for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nathan Dodge
Jr. Member
 
Total Posts:  1
Joined:  2009-12-15
 

Hello,

I have the same issue, after installing Magento (v1.4.1.1) on OVH hosting, where you have restricted permissions etc.

head var/report/724262186

a
:5:{i:0;s:71:"Could not determine temp directory, please specify a cache_dir manually";i:1;s:4213:"#0 /homez.325/epiceset/www/magento-1.4.1.1/lib/Zend/Cache/Backend.php(197): Zend_Cache::throwException('Could not deter...')
...

Modifying the lib/Zend/Cache/Backend/File.php at line 90, as suggested by others, actually does work.
But, isn’t there a better way??

Is there a way to configure this in .htaccess.

Here’s my .htaccess file, with my unsuccessful path entries ( the tmp directory has 777 access):

SetEnv REGISTER_GLOBALS 0
SetEnv ZEND_OPTIMIZER 1
SetEnv MAGIC_QUOTES 1
SetEnv PHP_VER 5
AcceptPathInfo On

<IfModule mod_php5.c>
    
php_value upload_tmp_dir "/homez.325/epiceset/www/boutique/var/tmp"
    
php_value cache_dir "/homez.325/epiceset/www/boutique/var/tmp"
 
</IfModule>

Note: Magento on my Ubuntu PC has no problems at all, and I don’t need to hack the lib/Zend/Cache/Backend/File.php.

Thanks,
Nathan

 
Magento Community Magento Community
Magento Community
Magento Community
 
ambidex
Jr. Member
 
Total Posts:  1
Joined:  2008-08-01
 

Thanks Tuppi Sau, this worked for me!
Magento ver. 1.4.1.1

 
Magento Community Magento Community
Magento Community
Magento Community
 
pbroadby
Jr. Member
 
Total Posts:  2
Joined:  2010-11-07
 

Thanks for the help with this one. I was struggling with the same problem with Magento ver. 1.4.1.1 and was only when I made a tmp/ directory within the magento directory that the backend worked correctly.

Interestingly enough when I run magento-check.php I still get

Your server does not meet the following requirements in order to install Magento.
The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:

Safe Mode is on

Yet the install is working....

 
Magento Community Magento Community
Magento Community
Magento Community
 
Modest
Member
 
Total Posts:  35
Joined:  2009-08-08
 
rawaby88 - 18 August 2010 12:48 PM

hi
i have the last version of magento 1.4.1.1
and this fix work for me without writing any codes
for me i create tmp folder inside ->>> yoursite/magento/tmp got the same error
so i create the second tmp folder in the root ->>> yoursite/tmp and this work for me

i hope this will help

btw this was the second time i make install for magento cause first time i had problem for upload photo and i did change my code like they said before , it work for me but i couldn’t upload photos

sorry for my english

have a good day

Thank you rawaby88 !
This method applies to the latest version magento 1.4.1.1

 
Magento Community Magento Community
Magento Community
Magento Community
 
fstrube
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2010-10-04
Alexandria, VA
 

I had this same error because the permissions on my /tmp directory were incorrect.  They needed to be writable by the web server.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jhow08
Jr. Member
 
Total Posts:  1
Joined:  2009-01-30
 
JMJ Development - 16 November 2009 03:50 PM

Hi,

If you are still having issues with this try creating a new dir called tmp.

Navigate to app/code/core/Zend/Cache/Backend/

Edit File.php

Change:

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

to

protected $_options = array(
        
'cache_dir' => 'tmp/',


For Magento Version 1.4.1.0

Navigate to lib/Zend/Cache/Backend/

Edit File.php

Change:

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

to

protected $_options = array(
        
'cache_dir' => 'tmp/',

This worked for me.

Hope it helps.


Regards,

Jack

Really dude, thanks a lot !

 
Magento Community Magento Community
Magento Community
Magento Community
 
TonyHou
Jr. Member
 
Avatar
Total Posts:  12
Joined:  2011-01-30
New Zealand
 

Step 1. In your store directory create a directory(folder) called “tmp” and give it a “777″ permision( read/write/execute). your directory will look like this: “yourstoredirectory/tmp”

Step 2. Navigate to “yourstoredirectory/lib/Zend/Cache/Backend/File.php” and on line 91 replace:

‘cache_dir’ => ’null’,

with:

‘cache_dir’ => ’tmp/’,

Step 3. Save the file and that’s it!

Solution is from this post: http://iamatestsite.com/fix-could-not-determine-temp-directory-please-specify-a-cache_dir-manually-error/

 
Magento Community Magento Community
Magento Community
Magento Community
 
SafariYellow
Jr. Member
 
Total Posts:  27
Joined:  2010-05-24
 
Cristian Livadaru - 26 August 2010 03:09 AM

This happened to me after moving my Magento Store from my dev domain to the production domain.
Unfortunately the Produciton server had php_safemode turned ON, Magento doesn’t like this and also complains during installation, but if you move a store you won’t notice any complain from magento ... except for these errors.
Turning php_safemode off fixed the problem for me.

Thanks Christian… this fixed it for me (ver 1.5.0.1).

 
Magento Community Magento Community
Magento Community
Magento Community
 
sjxroot
Jr. Member
 
Total Posts:  1
Joined:  2011-09-04
 

I’ve noticed it and the problem is solved. Thank you very much!

Tuppi Sau - 26 July 2010 02:27 AM

This fix is specially for magento ce 1.4.1.0, for other magento version it may or may not be applicable:

This error is caused because the magento is unable to find the temporary directory at the server:

Use following code to find if there is temp folder assigned to server:

<pre>
<?php
    
//var_dump($_ENV);
    //var_dump($_SERVER);
    
foreach (array($_ENV$_SERVER) as $tab){
        
foreach (array('TMPDIR''TEMP''TMP''windir''SystemRoot') as $key{
            
if (isset($tab[$key])) {
                
if (($key == 'windir') or ($key == 'SystemRoot')) {
                    $dir 
realpath($tab[$key] '\\temp');
                
else {
                    $dir 
realpath($tab[$key]);
                
}
                
if (is_readable($dir)) {
                    
if (is_writable($dir)) {
                        
echo $dir;
                    
}
                }
            }
        }
    }
?>
</pre>

if the above code returns some value, then this fix won’t work for you.

if it returns nothing then proceed with following steps:
1. Create a ‘tmp’ directory at [Magento Directory]/var/
2. Give 0777 permission to ‘tmp’
3. Go to: [Magento Directory]/lib/Zend/Cache/
4. Open file Backend.php
5. Find this line “if ($this->_isGoodTmpDir(’\\temp’)) “ around line 194
6. After closing if put following
else{
    
return 'var/tmp/';
}
7. Save file
8. That’s it, go and enjoy and start finding other issues, exceptions and bugs, because Magento consists of never ending bugs.
 
Magento Community Magento Community
Magento Community
Magento Community
 
nikola99
Member
 
Total Posts:  47
Joined:  2010-04-09
 
fstrube - 12 January 2011 02:31 PM

I had this same error because the permissions on my /tmp directory were incorrect.  They needed to be writable by the web server.

Same thing here. Magento is trying to write to the system temp directotry which is /tmp not Magento var/tmp e.g. /www/magento/var/tmp. Changing permissions on that fixed the problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ricardo_Martins
Member
 
Avatar
Total Posts:  48
Joined:  2009-02-04
Santos, SP, Brazil
 

If you dont want to touch in core files like File.php, you can SetEnv at .htaccess at your hosting…

I put this line at the end of my .htaccess:

SetEnv TMP /absolute/path/to/my/magento/var/cache

And it will use the writable and existent tmp dir.

I guess its a better way for doing this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tonkberlin
Jr. Member
 
Avatar
Total Posts:  30
Joined:  2010-10-15
Berlin
 
Ricardo_Martins - 25 January 2012 02:15 AM

SetEnv TMP /absolute/path/to/my/magento/var/cache

Does not work for me :-(

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 3