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

mac2022-06-30  91

方法:有错误或者空白先打开错误提示,ftp看cache错误日志 或者 面板查看错误日志,再对比数据库是否正确,可拿脚本看是否能连接

\cp -r  backipmysql/nlbarb_007li/ .

chown -R mysql:mysql  nlbarb_007li

如果是前台错误,打开文件 \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

注意:有些zc 1.39是没有ssu/cores/parser.php目录的

 

解决方案:

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

protected static function getClass() {

转载于:https://www.cnblogs.com/alex-13/p/4267375.html

最新回复(0)