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


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

    cp -r  backipmysql/nlbarb_007li/ .

    chown -R mysql:mysql  nlbarb_007li

    如果是前台错误,打开文件 includesextra_configuresenable_error_logging.php
    如果是后台错误,打开文件 adminincludesextra_configuresenable_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() {

  • 相关阅读:
    Nginx:缓存
    Nginx:静态资源压缩
    Cassandra:安装
    Cassandra:java客户端操作
    Postgresql:Centos7安装Postgresql
    Cassandra:cql基本操作
    Cassandra:cqlsh基本命令和cql
    Cassandra:基本概念
    Nginx:rewrite功能配置
    Nginx:负载均衡
  • 原文地址:https://www.cnblogs.com/alex-13/p/4267375.html
Copyright © 2020-2023  润新知