码迷,mamicode.com
首页 > Web开发 > 详细

zencart低版本由php5.2.17升级PHP5.3环境下错误及解决方案

时间:2015-02-02 12:13:05      阅读:449      评论:0      收藏:0      [点我收藏+]

标签:

如果是前台错误,打开文件 \includes\extra_configures\enable_error_logging.php
如果是后台错误,打开文件 \admin\includes\extra_configures\enable_error_logging.php

查找 @ini_set(‘display_errors‘, 0);
修改为 @ini_set(‘display_errors‘, 1);

问题1.巨多Deprecated:错误或页面直接空白

解决方案:

/home/public_html/includes/application_top.php

define(‘STRICT_ERROR_REPORTING’, true);

if (defined(‘STRICT_ERROR_REPORTING‘) && STRICT_ERROR_REPORTING == true) {
@ini_set(‘display_errors‘, ‘1‘);
error_reporting(E_ALL^E_NOTICE^E_DEPRECATED);
} else {
error_reporting(0);
}

 

问题2.Fatal error: Cannot redeclare date_diff() in /home/public_html/includes/functions/functions_general.php on line 1479

解决方案:

/home/public_html/includes/functions/functions_general.php

if(!function_exists(‘date_diff‘)){
function date_diff($date1, $date2) {
//$date1 today, or any other day
//$date2 date to check against

$d1 = explode("-", $date1);
$y1 = $d1[0];
$m1 = $d1[1];
$d1 = $d1[2];

$d2 = explode("-", $date2);
$y2 = $d2[0];
$m2 = $d2[1];
$d2 = $d2[2];

$date1_set = mktime(0,0,0, $m1, $d1, $y1);
$date2_set = mktime(0,0,0, $m2, $d2, $y2);

return(round(($date2_set-$date1_set)/(60*60*24)));
}
}

 

问题3.Fatal error: Multiple access type modifiers are not allowed in /home/public_html/includes/classes/ssu/cores/parser.php on line 17

解决方案:

/home/public_html/includes/classes/ssu/cores/parser.php

protected static function getClass() {

zencart低版本由php5.2.17升级PHP5.3环境下错误及解决方案

标签:

原文地址:http://www.cnblogs.com/alex-13/p/4267375.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!