Magento调试 - 页面空白,打开错误报告的方法 02 November 2010 14:10 Tuesday by 小屋 分享收藏

问题:Magento页面一片空白 没显示什么东西,无法判断是否程序错误,所以要把错误显示打开使之能调试

解决:

1. 在网站根目录的.htaccess文件里加上

php_flag display_errors on
php_value error_reporting 2039
详情看另外一篇文章:(用.htaccess设置 PHP错误显示 )

2. 然后找到/errors/local.xml.sample这个文件,改成/errors/local.xml

3. 接着找到lib/Zend/Cache/Backend/File.php

查找 protected $_options = array( ’cache_dir’ => ‘null’,

替换成 protected $_options = array( ’cache_dir’ => ‘tmp/’,

4. 最后在/index.php文件里把error_reporting(E_ALL | E_STRICT) ;和ini_set('display_errors', 1) ;注释取消。可以再加上Mage::setIsDeveloperMode(true) ;这句配合第二点把magento的开发模式打开

这几步下来Magento的错误报告 就打开啦!

作者: Sjolzy

--EOF--

引用地址:

发表评论:

  给 “Magento调试 - 页面空白,打开错误报告的方法” 评分

广告、无意义的评论必删!