diff --git a/classes/class_cache_redis.php b/classes/class_cache_redis.php
index 08718b7a..c279f644 100644
--- a/classes/class_cache_redis.php
+++ b/classes/class_cache_redis.php
@@ -30,6 +30,9 @@ class class_cache_redis {
private function connect()
{
$config = config('database.redis');
+ if (empty($config['host'])) {
+ return false;
+ }
$redis = new Redis();
$params = [
$config['host'],
diff --git a/include/core.php b/include/core.php
index 473ad583..e66edd18 100644
--- a/include/core.php
+++ b/include/core.php
@@ -3,8 +3,12 @@ if(!defined('IN_TRACKER')) {
die('Hacking attempt!');
}
if (!file_exists($rootpath . '.env')) {
- header('Location: ' . getBaseUrl() . 'install/install.php');
- exit(0);
+ $installScriptRelativePath = 'install/install.php';
+ $installScriptFile = $rootpath . "public/$installScriptRelativePath";
+ if (file_exists($installScriptFile)) {
+ header('Location: ' . getBaseUrl() . $installScriptRelativePath);
+ exit(0);
+ }
}
error_reporting(E_ALL);
ini_set('display_errors', 0);
diff --git a/nexus/Install/Install.php b/nexus/Install/Install.php
index 7ed4f78e..af234eb3 100644
--- a/nexus/Install/Install.php
+++ b/nexus/Install/Install.php
@@ -465,6 +465,7 @@ class Install
continue;
}
$this->doLog("[IMPORT DATA] $table, $sql");
+ sql_query("truncate table $table");
sql_query($sql);
}
return true;
diff --git a/nexus/Install/install/install.php b/nexus/Install/install/install.php
index 5f16899b..7ca81879 100644
--- a/nexus/Install/install/install.php
+++ b/nexus/Install/install/install.php
@@ -108,9 +108,9 @@ if ($currentStep == 4) {
$pass = $settingTableRows['pass'];
while ($isPost) {
try {
- $install->importInitialData();
- $install->saveSettings($settings);
$install->createSymbolicLinks($symbolicLinks);
+ $install->saveSettings($settings);
+ $install->importInitialData();
$install->nextStep();
} catch (\Exception $e) {
$_SESSION['error'] = $e->getMessage();
diff --git a/nexus/Install/settings.default.php b/nexus/Install/settings.default.php
index 28ecc0ed..bc7f784a 100644
--- a/nexus/Install/settings.default.php
+++ b/nexus/Install/settings.default.php
@@ -91,8 +91,8 @@
'smtp_from' => NULL,
'smtpaddress' => 'smtp.qq.com',
'smtpport' => '25',
- 'accountname' => '',
- 'accountpassword' => '',
+ 'accountname' => '353856593@qq.com',
+ 'accountpassword' => 'zixbeopslzidbgbi',
),
'security' =>
array (
@@ -347,8 +347,8 @@
'code' =>
array (
'mainversion' => 'NexusPHP',
- 'subversion' => 'Standard v1.5 Beta 4 by xiaomlove',
- 'releasedate' => '2010-09-19',
- 'website' => 'http://nexusphp.cn',
+ 'subversion' => 'v1.6.0-beta1',
+ 'releasedate' => '2021-01-28',
+ 'website' => 'http://nexusphp.cn',
),
);
\ No newline at end of file