Could not determine temp directory, please specify a cache_die manually..after magento installed

Hi guys,

After magento is installed, you may have the error "Could not determine temp directory, please specify a cache_dir manually" when clicking on some pages.

Usually it happened in shared web hosting, and on individual server it happened when the permission of tmp folder set wrong.

Firstly, copy "/lib/Zend/Cache/Backend/File.php" to "/app/code/local/Zend/Cache/Backend/File.php", then in line 91:
'cache_dir' =>  null,

change to

'cache_dir' => "var/tmp/",

You can also change the cache folder wherever you want, and that directory you should create yourself and change the permission to 755.

and you done :)


  1. Thanks,

    It work like a charm.

    All The Best.

    You are genius .


  2. Hi, I can't locate this directory: "/app/code/local/Zend/Cache/Backend/File.php"

    In local there are no further directory levels?

  3. It is in "/lib/Zend/Cache/Backend/File.php" not on app/code...

    Please read it again; you have to copy that file into app/code..
    because it's not good practice to make change into core file; so

  4. No I realise that.

    I meant that I cannot copy the file to /app/code/local/Zend/Cache/Backend/File.php
    as no further directories exist within local?

  5. Pete,

    You've got to create the "further directories".

    The path Zend/Cache/Backend is not going to exist unless you've previously created it.

    Try: mkdir -p app/code/local/Zend/Cache/Backend if you're on Linux.

  6. Not working Mate.... The magento CMS is a piece of Crap

  7. Best web hosting companies. Reviews, rates, statistics of top hosting companies.
    Find best hosting company at


Post a Comment

Popular posts from this blog

Magento Reindexing problem - take too long time

Magento Navigation menu of CMS pages

Script for to remove the cache - Magento