SOLVED: C5.4.2 / Multilingual addon not working (could not determine temp directory...)

Permalink 3 users found helpful
Hi all,

i upgraded my site from Concrete 5.4.1.1 to 5.4.2 .
Did it first locally on my PC, running XAMPP under Windoze XP and everything is fine, including the new multilanguage addon.

So i did the same for the live system and ran into the following problem:
- Site is running fine with all options and stuff
- Multilingual addon installed without error (even removed and reinstalled it)
But, when i click the "Multilingual"-Button in the dashboard, i will see this URL:
http://www.mydomain.de/index.php/dashboard/multilingual/setup/...
Showing me this message:
An unexpected error occurred.
Could not determine temp directory, please specify a cache_dir manually


Googling around, i only found two topics with Concrete5. Looks like a Zend-thingy and the discussed problem is about PHP Safe_Mode.

Safe_Mode is definitely off. The above mentioned problems are about getting this error while changing user passwords. Tried it, and works fine here.

So, i'm more than puzzled. And i don't have an idea, where to look at (because every little thing works, only multilanguage crashes).

Any ideas, hints, heads-up for me?

Marc

Mac65
 
Mac65 replied on at Permalink Reply
Mac65
Found the solution and already posted in the right forum (Marketplace -> Internationalization -> Support).
Reposting here, just to have the solution public:
--------------------------------------------------------
Found the trick and have it up and running now.

I found this interesting article (german):
http://www.sebastian-widmann.de/2011/08/25/concrete5-und-das-cache_...

The problem is caused by a _really_ strange attempt to find the temp-dir by Zend.
Modification is needed in:
/myc5dir/concrete/libraries/3rdparty/Zend/Cache/Backend/File.php

Search for
class Zend_Cache_Backend_File extends Zend_Cache_Backend implements Zend_Cache_Backend_ExtendedInterface
{
<--- snip comments --->
    protected $_options = array(
        'cache_dir' => null,
        'file_locking' => true,
        'read_control' => true,
        'read_control_type' => 'crc32',
        'hashed_directory_level' => 0,
        'hashed_directory_umask' => 0700,
        'file_name_prefix' => 'zend_cache',
        'cache_file_umask' => 0600,
        'metadatas_array_max_size' => 100
    );

And change the stupid 'null' to your /tmp directory.
'cache_dir' => '/tmp',

did the tricky magic for me. Now it works perfectly.
I would suggest that the dev-gurus point this to some internal /concrete/files/tmp-dir in future releases. My list of "needed hacks after installation" is growing :-(

A happy
Marc
nicobe replied on at Permalink Reply
the "tmp" directory didn't exist in my concrete directory. Don't forget to create un "tmp" (note another name !) under concrete directory.

Thanks!
okp replied on at Permalink Reply
okp
Hi there,

grrrrr still not working for me.
I tried to create tmp dir almost everywhere, still no success...
I'm on a shared hosting, with a www/ folder on root.
Any clue ?
nicobe replied on at Permalink Reply
my "tmp" directory is there : www/concrete/tmp
After creating, set permissions to "777".

and now?
okp replied on at Permalink Reply
okp
I've done that before, no success...
But it looks that updates in backend.php are not taken into account either
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...
Mac65 replied on at Permalink Reply
Mac65
Glad to read, that you solved the problem.
But could you please post some more info about the .../updatesxxx folder?

I don't update C5, just install it new from scratch into a new dir and copy my personal content from the "old dir". It's just something with "feeling better" instead of updating.

So i don't have any experience about an updated C5 installation.

Marc
okp replied on at Permalink Reply
okp
Indeed, all depends on where your actual core files are located.
With a fresh install, it is /concrete/...
But if you use the built-in update feature, it may be /updates/concretex.x.x/...

Not sure if I answered your question, don't hesitate if I didn't.
TorstenKelsch replied on at Permalink Reply
TorstenKelsch
It works in deed, thank you for posting your solution.

I only think it’s better not to change the core files. Instead you can create a directory path under /libraries, which has the same structure like in the updates folder: /libraries/3rdparty/Zend/Cache/Backend. And there you put your modified copy of File.php.
witwag replied on at Permalink Reply
witwag
Excellent post. Just had the same problem with multilingual addon on a 5.5.2...... It solved it.
jsuwala replied on at Permalink Reply
jsuwala
On a Windows Server (IIS), specifying the full path for the 'cache_dir' is important.

Example that worked for me on IIS:
protected $_options = array(
        'cache_dir' => 'C:/inetpub/wwwroot/Concrete5/files/tmp',
        'file_locking' => true,
        'read_control' => true,
        'read_control_type' => 'crc32',
        'hashed_directory_level' => 0,
        'hashed_directory_umask' => 0700,
        'file_name_prefix' => 'zend_cache',
        'cache_file_umask' => 0600,
        'metadatas_array_max_size' => 100
    );