Could not determine temp directory, please specify a cache_dir manually

Permalink 5 users found helpful
Hi everyone,

I'm encountering a problem that has already been described and solved for some users, but not me...

I got this error :
Could not determine temp directory, please specify a cache_dir manually

while navigating in dashboard in 2 locations :
- If I try to "Add user", I got this page:http://awesomescreenshot.com/0b6k6w691... (oddly not themed)
- After installing Internationalization, when clicking "Multilingual", I got this:http://awesomescreenshot.com/047k6x1c4...

I updated the file
/concrete/libraries/3rdparty/Zend/Cache/Backend/File.php
by modifying
'cache_dir' => null,

to
'cache_dir' => 'tmp/',


A few thing that might help:
- I tried to edit the error message which is located in
/concrete/libraries/3rdparty/Zend/Cache/Backend.php (line ~197)
Zend_Cache::throwException('BLABLABLA Could not determine temp directory, please specify a cache_dir manually');

The message displayed is still the same. (no "BLABLABLA")

- The URL of my site is automatically changed from "www.mysite.com" to "mysite.com" when navigating in C5 pages. (dashboard or site)

- Is also tried to put the absolute path for cache_dir
'cache_dir' => '/homez.000/mydomain/www/tmp/',



Any ideas...?

okp
 
okp replied on at Permalink Best Answer Reply
okp
SOLVED !!!

I had to modify the file.php not in /concrete/... dir, but in /updates/concrete5.4.2/... dir !
It seems that core files used are the ones in /updates/ folder.
Weird, though...
MattWaters replied on at Permalink Reply
MattWaters
Cool, glad you got it solved. I'm going to bookmark this for future reference.

As you noticed, new copies of the core are automatically stored in the updates/ directory and there's a constant added in config/site.php that points the site to the new files.
Judder replied on at Permalink Reply
Judder
This problem (obviously) shouldn't occur, but the best solution we found was to use the default files/tmp folder instead

/concrete/libraries/3rdparty/Zend/Cache/Backend/File.php

protected $_options = array(
'cache_dir' => 'files/tmp',
...
poetze replied on at Permalink Reply
poetze
Hi,

I have the same problem, I transferred from my testserver to my live server. I can access my backend, but don't get any content on my pages, instead I get the message: Could not determine temp directory, please specify a cache_dir manually.
I searched for the cache_dir in my config directory of the original concrete installation as well as in the directory of the updates, but can't find it.

Any hints where I should change the cache_dir?

Thanks, poetze
okp replied on at Permalink Reply
okp
Did you search in
/concrete/libraries/3rdparty/Zend/Cache/Backend/File.php
Or
updates/concretexxx/libraries/3rdparty/Zend/Cache/Backend/File.php
poetze replied on at Permalink Reply
poetze
Ok, now I found it, didn't search in the ZEND directory.
But now I get an error that "cache_dir must be a directory"

I tried it with a relativ and an absolute path, but that doesn't help.
Any suggestions, maybe it's obvious but I don't get it.

thanks
okp replied on at Permalink Reply
okp
What did you put as cache_dir value ?
If you do this:
'cache_dir' => 'tmp/',


you have to create manually a "tmp" folder in concrete root, and chmod it to 777.
poetze replied on at Permalink Reply
poetze
Thanks a lot, okp. Now it works, I thought the tmp directoy is the one that already exists in the files directory.
cainKuri replied on at Permalink Reply
cainKuri
Thank you so much... it help me a lot !
i just create "tmp" directory inside concrete (core) directory but have to be in root of your site where concrete is installed !!!

thanks.
cmmaaj replied on at Permalink Reply
Hello everybody.

Much helpful solved me a great problem.

Thanks all for the strong contribution.
landollweb replied on at Permalink Reply
landollweb
Thanks for posting this, it fixed my problem, too.
C5ThemeTeam replied on at Permalink Reply
C5ThemeTeam
Not sure if this is connected but I got the error when PHP safe mode was on.
After PHP Safe Mode was turned off I followed the steps below & site was fixed in two minutes. Thanks very much ;-)
landollweb replied on at Permalink Reply
landollweb
In my case, my site has been running with php safe_mode = Off all along.
ProjbyP replied on at Permalink Reply
ProjbyP
Every site I update has to have the cache directory manually added. You would think it would be fixed in the files! I've done it so many times that I don't even need the directions anymore!

*sigh*

Can we get a fix for this issue???
emoore33 replied on at Permalink Reply
Because I could see this would get really old I went ahead and used the override capability. To do this I copied the Files.php file from

\concrete\libraries\3rdparty\Zend\Cache\Backend
to
\libraries\3rdparty\Zend\Cache\Backend

and made the edits there. I was able to use
'cache_dir' => "files/tmp",



(Caution to Windows users: you can see that I am using backslashes, because I am on a Windows server, so I automatically used a backslash when I first made the edit, which does not work.)