From 3b98e57a05d945787053030defd7095c9eb3cea3 Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Sat, 25 May 2024 16:16:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A8=8B=E5=BA=8F=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E3=80=91=E4=BC=98=E5=8C=96=E5=AE=89=E8=A3=85mysql8.0=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/public/install/index.php | 6 +++++- crmeb/public/install/templates/step3.php | 5 +++++ crmeb/public/install/templates/step5.php | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/crmeb/public/install/index.php b/crmeb/public/install/index.php index 6c10a822b..56d0f111c 100755 --- a/crmeb/public/install/index.php +++ b/crmeb/public/install/index.php @@ -171,10 +171,14 @@ switch ($step) { $result = mysqli_query($conn, "SELECT @@global.sql_mode"); $result = $result->fetch_array(); $version = mysqli_get_server_info($conn); - if ($version >= 5.7) { + if ($version >= 5.7 && $version < 8.0) { if (strstr($result[0], 'STRICT_TRANS_TABLES') || strstr($result[0], 'STRICT_ALL_TABLES') || strstr($result[0], 'TRADITIONAL') || strstr($result[0], 'ANSI')) exit(json_encode(-2));//数据库配置需要修改 } + if ($version >= 8.0) { + if (strstr($result[0], 'ONLY_FULL_GROUP_BY')) + exit(json_encode(-22));//数据库配置需要修改 + } $result = mysqli_query($conn, "select count(table_name) as c from information_schema.`TABLES` where table_schema='$dbName'"); $result = $result->fetch_array(); if ($result['c'] > 0) { diff --git a/crmeb/public/install/templates/step3.php b/crmeb/public/install/templates/step3.php index 639181b84..459bdf2bb 100755 --- a/crmeb/public/install/templates/step3.php +++ b/crmeb/public/install/templates/step3.php @@ -292,6 +292,11 @@ $('#J_install_tip_dbport').html(''); $('#J_install_tip_dbname').html('请在mysql配置文件修sql-mode或sql_mode为NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION查看文档'); return false; + } else if (res == -22) { + $('#J_install_tip_dbhost').html(''); + $('#J_install_tip_dbport').html(''); + $('#J_install_tip_dbname').html('请关闭ONLY_FULL_GROUP_BY模式查看文档'); + return false; } else if (res == 1045) { $('#J_install_tip_dbhost').html(''); $('#J_install_tip_dbport').html(''); diff --git a/crmeb/public/install/templates/step5.php b/crmeb/public/install/templates/step5.php index 832bedab6..ed3768634 100755 --- a/crmeb/public/install/templates/step5.php +++ b/crmeb/public/install/templates/step5.php @@ -35,7 +35,7 @@ $host = $_SERVER['HTTP_HOST']; 进入前台
- 进入后台 + 进入后台