zencart低版本由php5.2.17升級PHP5.3環境下錯誤及解決方案

來源:互聯網
上載者:User

標籤:

如果是前台錯誤,開啟檔案 \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環境下錯誤及解決方案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.