初次安装Magento商城 后台报错的解决方法

   2015-08-02 0
核心提示:今天初次安装Magento, 开始装的是英文版,后来又找到中文版,安装后在后台都有同一个错误,就是登陆后台,随便点击一个链接,都有报错
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: xxxxxxxxxx(这是一串数字)
问Google,找到解决方案
步骤1
重命名 errors/local.xml.sample 为 local.xml
这样修改可以看到详细的错误信息:
Could not determine temp directory, please specify a cache_dir manually
Trace:
#0 F:\Work\makingware_ce-1.5.2\lib\Zend\Cache\Backend.php(197): Zend_Cache::throwException('Could not deter...')
#1 F:\Work\makingware_ce-1.5.2\lib\Zend\Cache\Backend\File.php(123): Zend_Cache_Backend->getTmpDir()
#2 F:\Work\makingware_ce-1.5.2\lib\Zend\Cache.php(153): Zend_Cache_Backend_File->__construct(Array)
#3 F:\Work\makingware_ce-1.5.2\lib\Zend\Cache.php(94): Zend_Cache::_makeBackend('File', Array, false, false)
#4 F:\Work\makingware_ce-1.5.2\lib\Zend\Locale\Data.php(314): Zend_Cache::factory('Core', 'File', Array, Array)
#5 F:\Work\makingware_ce-1.5.2\app\code\core\Mage\Core\Block\Html\Calendar.php(42): Zend_Locale_Data::getList('zh_CN', 'days')
....后面省略
此错误说明是缓存目录需要手动设置
步骤2
修改文件 lib\Zend\Cache\Backend\File.php 在第90行的位置

复制代码
代码如下:

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
);

看到以上代码,设置 cache_dir

复制代码
代码如下:

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
);

修改完成!
BTW:在Mathon3的极速模式(chrome模式)下点击不起作用!
 
标签: magento 商城
反对 0举报 0 评论 0
 

免责声明:本文仅代表作者个人观点,与乐学笔记(本网)无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
    本网站有部分内容均转载自其它媒体,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责,若因作品内容、知识产权、版权和其他问题,请及时提供相关证明等材料并与我们留言联系,本网站将在规定时间内给予删除等相关处理.

点击排行