Results 1 to 2 of 2

Thread: error : cache_dir must be a directory?

  1. #1
    Join Date
    2008-02-07
    Posts
    3

    Default error : cache_dir must be a directory?

    I am working with Magento 1.7 and suddenly I have this error when I go to cache management:
    cache_dir must be a directory
    I tried this solution to change this file lib/Zend/Cache/Backend/File.php
    'cache_dir' => 'null' to 'cache_dir' => 'tmp/' but does not work

  2. #2
    Join Date
    2013-02-23
    Posts
    1

    Default

    找到lib\Zend\Cache\Backend\File.php这个文件
    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
    );
    将以上的代码修改成如下代码,

    protected $_options = array(
    'cache_dir' => 'var/cache',
    '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
    );

    这样修改 问题就解决了,去后台刷新一下,成功解决

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 2018-11-02, 08:49 AM
  2. Replies: 0
    Last Post: 2016-10-01, 09:40 AM
  3. Disable directory listings
    By topvip in forum 网络资源
    Replies: 0
    Last Post: 2012-09-30, 12:10 PM
  4. Rewrite a sub domain to a directory
    By sunshine in forum 建站交流
    Replies: 0
    Last Post: 2007-08-19, 10:21 PM
  5. Rewrite a sub domain to a directory
    By smiling in forum 服务器环境搭建
    Replies: 1
    Last Post: 2007-08-18, 10:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •