Version Description
Download this release
Release Info
Developer | cory@lamle.org |
Plugin | Duplicator – WordPress Migration Plugin |
Version | 1.2.20 |
Comparing to | |
See all releases |
Code changes from version 1.2.18 to 1.2.20
- classes/package/class.pack.archive.php +2 -2
- classes/package/class.pack.installer.php +4 -1
- classes/package/class.pack.php +6 -6
- classes/utilities/class.u.json.php +152 -152
- classes/utilities/class.u.php +1 -1
- define.php +2 -2
- duplicator.php +1 -1
- installer/build/assets/inc.css.php +1 -1
- installer/build/classes/class.logging.php +65 -65
- installer/build/classes/class.server.php +11 -4
- installer/build/ctrls/ctrl.step2.php +417 -416
- installer/build/main.installer.php +10 -9
- installer/build/view.help.php +7 -7
- installer/build/view.step1.php +131 -99
- installer/build/view.step2.php +418 -418
- installer/build/view.step3.php +332 -332
- installer/build/view.step4.php +2 -2
- readme.txt +1 -1
- views/help/gopro.php +1 -1
- views/packages/details/controller.php +2 -2
- views/packages/details/detail.php +2 -2
- views/packages/details/transfer.php +2 -2
- views/packages/main/packages.php +23 -19
- views/packages/main/s1.setup2.php +4 -4
- views/packages/main/s2.scan1.php +6 -5
- views/packages/main/s2.scan2.php +2 -1
- views/packages/main/s2.scan3.php +10 -13
- views/packages/main/s3.build.php +56 -22
- views/settings/schedule.php +25 -25
- views/settings/storage.php +2 -2
- views/tools/support.php +122 -122
classes/package/class.pack.archive.php
CHANGED
@@ -6,7 +6,7 @@ require_once (DUPLICATOR_PLUGIN_PATH.'classes/package/class.pack.archive.zip.php
|
|
6 |
require_once (DUPLICATOR_PLUGIN_PATH.'lib/forceutf8/Encoding.php');
|
7 |
|
8 |
/**
|
9 |
-
* Class for
|
10 |
*
|
11 |
* Standard: PSR-2 (almost)
|
12 |
* @link http://www.php-fig.org/psr/psr-2
|
@@ -425,7 +425,7 @@ class DUP_Archive
|
|
425 |
* - error 'too many files open' for recursion
|
426 |
* - $file->getExtension() is not reliable as it silently fails at least in php 5.2.17
|
427 |
* - issues with when a file has a permission such as 705 and trying to get info (had to fallback to pathinfo)
|
428 |
-
* - basic conclusion wait on the SPL libs
|
429 |
* - tight recursive loop use caution for speed
|
430 |
*
|
431 |
* @return array Returns an array of directories to include in the archive
|
6 |
require_once (DUPLICATOR_PLUGIN_PATH.'lib/forceutf8/Encoding.php');
|
7 |
|
8 |
/**
|
9 |
+
* Class for handling archive setup and build process
|
10 |
*
|
11 |
* Standard: PSR-2 (almost)
|
12 |
* @link http://www.php-fig.org/psr/psr-2
|
425 |
* - error 'too many files open' for recursion
|
426 |
* - $file->getExtension() is not reliable as it silently fails at least in php 5.2.17
|
427 |
* - issues with when a file has a permission such as 705 and trying to get info (had to fallback to pathinfo)
|
428 |
+
* - basic conclusion wait on the SPL libs until after php 5.4 is a requirments
|
429 |
* - tight recursive loop use caution for speed
|
430 |
*
|
431 |
* @return array Returns an array of directories to include in the archive
|
classes/package/class.pack.installer.php
CHANGED
@@ -122,7 +122,7 @@ class DUP_Installer
|
|
122 |
/**
|
123 |
* Generates the final installer file from the template file
|
124 |
*
|
125 |
-
* @param string $template The path to the installer template which is
|
126 |
*
|
127 |
* @return null
|
128 |
*/
|
@@ -137,6 +137,8 @@ class DUP_Installer
|
|
137 |
//Option values to delete at install time
|
138 |
$deleteOpts = $GLOBALS['DUPLICATOR_OPTS_DELETE'];
|
139 |
|
|
|
|
|
140 |
$replace_items = Array(
|
141 |
//COMPARE VALUES
|
142 |
"fwrite_created" => $this->Package->Created,
|
@@ -150,6 +152,7 @@ class DUP_Installer
|
|
150 |
"fwrite_archive_name" => "{$this->Package->NameHash}_archive.zip",
|
151 |
"fwrite_archive_onlydb" => $this->Package->Archive->ExportOnlyDB,
|
152 |
"fwrite_package_notes" => $this->Package->Notes,
|
|
|
153 |
"fwrite_secure_name" => $this->Package->NameHash,
|
154 |
"fwrite_dbhost" => $this->Package->Installer->OptsDBHost,
|
155 |
"fwrite_dbport" => $this->Package->Installer->OptsDBPort,
|
122 |
/**
|
123 |
* Generates the final installer file from the template file
|
124 |
*
|
125 |
+
* @param string $template The path to the installer template which is originally copied from main.installer.php
|
126 |
*
|
127 |
* @return null
|
128 |
*/
|
137 |
//Option values to delete at install time
|
138 |
$deleteOpts = $GLOBALS['DUPLICATOR_OPTS_DELETE'];
|
139 |
|
140 |
+
DUP_Log::Info("PACK SIZE: {$this->Package->Size}");
|
141 |
+
|
142 |
$replace_items = Array(
|
143 |
//COMPARE VALUES
|
144 |
"fwrite_created" => $this->Package->Created,
|
152 |
"fwrite_archive_name" => "{$this->Package->NameHash}_archive.zip",
|
153 |
"fwrite_archive_onlydb" => $this->Package->Archive->ExportOnlyDB,
|
154 |
"fwrite_package_notes" => $this->Package->Notes,
|
155 |
+
"fwrite_package_size" => $this->Package->Archive->Size,
|
156 |
"fwrite_secure_name" => $this->Package->NameHash,
|
157 |
"fwrite_dbhost" => $this->Package->Installer->OptsDBHost,
|
158 |
"fwrite_dbport" => $this->Package->Installer->OptsDBPort,
|
classes/package/class.pack.php
CHANGED
@@ -293,10 +293,9 @@ class DUP_Package
|
|
293 |
if (isset($post)) {
|
294 |
$post = stripslashes_deep($post);
|
295 |
|
296 |
-
$name_chars = array(".", "-");
|
297 |
$name = ( isset($post['package-name']) && !empty($post['package-name'])) ? $post['package-name'] : self::getDefaultName();
|
298 |
$name = substr(sanitize_file_name($name), 0, 40);
|
299 |
-
$name = str_replace(
|
300 |
|
301 |
$filter_dirs = isset($post['filter-dirs']) ? $this->Archive->parseDirectoryFilter($post['filter-dirs']) : '';
|
302 |
$filter_files = isset($post['filter-files']) ? $this->Archive->parseFileFilter($post['filter-files']) : '';
|
@@ -304,17 +303,18 @@ class DUP_Package
|
|
304 |
$tablelist = isset($post['dbtables']) ? implode(',', $post['dbtables']) : '';
|
305 |
$compatlist = isset($post['dbcompat']) ? implode(',', $post['dbcompat']) : '';
|
306 |
$dbversion = DUP_DB::getVersion();
|
307 |
-
$dbversion = is_null($dbversion) ? '- unknown -'
|
308 |
$dbcomments = DUP_DB::getVariable('version_comment');
|
309 |
$dbcomments = is_null($dbcomments) ? '- unknown -' : $dbcomments;
|
310 |
|
|
|
311 |
//PACKAGE
|
312 |
$this->Created = date("Y-m-d H:i:s");
|
313 |
$this->Version = DUPLICATOR_VERSION;
|
314 |
$this->VersionOS = defined('PHP_OS') ? PHP_OS : 'unknown';
|
315 |
$this->VersionWP = $wp_version;
|
316 |
$this->VersionPHP = phpversion();
|
317 |
-
$this->VersionDB = $dbversion;
|
318 |
$this->Name = $name;
|
319 |
$this->Hash = $this->makeHash();
|
320 |
$this->NameHash = "{$this->Name}_{$this->Hash}";
|
@@ -327,7 +327,7 @@ class DUP_Package
|
|
327 |
$this->Archive->ExportOnlyDB = isset($post['export-onlydb']) ? 1 : 0;
|
328 |
$this->Archive->FilterDirs = esc_html($filter_dirs);
|
329 |
$this->Archive->FilterFiles = esc_html($filter_files);
|
330 |
-
$this->Archive->FilterExts = str_replace(array('.', ' '),
|
331 |
//INSTALLER
|
332 |
$this->Installer->OptsDBHost = esc_html($post['dbhost']);
|
333 |
$this->Installer->OptsDBPort = esc_html($post['dbport']);
|
@@ -337,7 +337,7 @@ class DUP_Package
|
|
337 |
$this->Database->FilterOn = isset($post['dbfilter-on']) ? 1 : 0;
|
338 |
$this->Database->FilterTables = esc_html($tablelist);
|
339 |
$this->Database->Compatible = $compatlist;
|
340 |
-
$this->Database->Comments = $dbcomments;
|
341 |
|
342 |
update_option(self::OPT_ACTIVE, $this);
|
343 |
}
|
293 |
if (isset($post)) {
|
294 |
$post = stripslashes_deep($post);
|
295 |
|
|
|
296 |
$name = ( isset($post['package-name']) && !empty($post['package-name'])) ? $post['package-name'] : self::getDefaultName();
|
297 |
$name = substr(sanitize_file_name($name), 0, 40);
|
298 |
+
$name = str_replace(array('.', '-', ';', ':', "'", '"'), '', $name);
|
299 |
|
300 |
$filter_dirs = isset($post['filter-dirs']) ? $this->Archive->parseDirectoryFilter($post['filter-dirs']) : '';
|
301 |
$filter_files = isset($post['filter-files']) ? $this->Archive->parseFileFilter($post['filter-files']) : '';
|
303 |
$tablelist = isset($post['dbtables']) ? implode(',', $post['dbtables']) : '';
|
304 |
$compatlist = isset($post['dbcompat']) ? implode(',', $post['dbcompat']) : '';
|
305 |
$dbversion = DUP_DB::getVersion();
|
306 |
+
$dbversion = is_null($dbversion) ? '- unknown -' : $dbversion;
|
307 |
$dbcomments = DUP_DB::getVariable('version_comment');
|
308 |
$dbcomments = is_null($dbcomments) ? '- unknown -' : $dbcomments;
|
309 |
|
310 |
+
|
311 |
//PACKAGE
|
312 |
$this->Created = date("Y-m-d H:i:s");
|
313 |
$this->Version = DUPLICATOR_VERSION;
|
314 |
$this->VersionOS = defined('PHP_OS') ? PHP_OS : 'unknown';
|
315 |
$this->VersionWP = $wp_version;
|
316 |
$this->VersionPHP = phpversion();
|
317 |
+
$this->VersionDB = esc_html($dbversion);
|
318 |
$this->Name = $name;
|
319 |
$this->Hash = $this->makeHash();
|
320 |
$this->NameHash = "{$this->Name}_{$this->Hash}";
|
327 |
$this->Archive->ExportOnlyDB = isset($post['export-onlydb']) ? 1 : 0;
|
328 |
$this->Archive->FilterDirs = esc_html($filter_dirs);
|
329 |
$this->Archive->FilterFiles = esc_html($filter_files);
|
330 |
+
$this->Archive->FilterExts = str_replace(array('.', ' '), '', esc_html($filter_exts));
|
331 |
//INSTALLER
|
332 |
$this->Installer->OptsDBHost = esc_html($post['dbhost']);
|
333 |
$this->Installer->OptsDBPort = esc_html($post['dbport']);
|
337 |
$this->Database->FilterOn = isset($post['dbfilter-on']) ? 1 : 0;
|
338 |
$this->Database->FilterTables = esc_html($tablelist);
|
339 |
$this->Database->Compatible = $compatlist;
|
340 |
+
$this->Database->Comments = esc_html($dbcomments);
|
341 |
|
342 |
update_option(self::OPT_ACTIVE, $this);
|
343 |
}
|
classes/utilities/class.u.json.php
CHANGED
@@ -1,153 +1,153 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class DUP_JSON
|
4 |
-
{
|
5 |
-
protected static $_messages = array(
|
6 |
-
JSON_ERROR_NONE => 'No error has occurred',
|
7 |
-
JSON_ERROR_DEPTH => 'The maximum stack depth has been exceeded',
|
8 |
-
JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON',
|
9 |
-
JSON_ERROR_CTRL_CHAR => 'Control character error, possibly incorrectly encoded',
|
10 |
-
JSON_ERROR_SYNTAX => 'Syntax error',
|
11 |
-
JSON_ERROR_UTF8 => 'Malformed UTF-8 characters. To resolve see https://snapcreek.com/duplicator/docs/faqs-tech
|
12 |
-
);
|
13 |
-
|
14 |
-
public static function customEncode($value, $iteration = 1)
|
15 |
-
{
|
16 |
-
if (DUP_Util::$on_php_53_plus) {
|
17 |
-
|
18 |
-
$encoded = json_encode($value);
|
19 |
-
|
20 |
-
switch (json_last_error()) {
|
21 |
-
case JSON_ERROR_NONE:
|
22 |
-
return $encoded;
|
23 |
-
case JSON_ERROR_DEPTH:
|
24 |
-
throw new RuntimeException('Maximum stack depth exceeded');
|
25 |
-
case JSON_ERROR_STATE_MISMATCH:
|
26 |
-
throw new RuntimeException('Underflow or the modes mismatch');
|
27 |
-
case JSON_ERROR_CTRL_CHAR:
|
28 |
-
throw new RuntimeException('Unexpected control character found');
|
29 |
-
case JSON_ERROR_SYNTAX:
|
30 |
-
throw new RuntimeException('Syntax error, malformed JSON');
|
31 |
-
case JSON_ERROR_UTF8:
|
32 |
-
if ($iteration == 1) {
|
33 |
-
$clean = self::makeUTF8($value);
|
34 |
-
return self::customEncode($clean, $iteration + 1);
|
35 |
-
} else {
|
36 |
-
throw new RuntimeException('UTF-8 error loop');
|
37 |
-
}
|
38 |
-
default:
|
39 |
-
throw new RuntimeException('Unknown error');
|
40 |
-
}
|
41 |
-
} else {
|
42 |
-
return self::oldCustomEncode($value);
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
public static function encode($value, $options = 0)
|
47 |
-
{
|
48 |
-
$result = json_encode($value, $options);
|
49 |
-
|
50 |
-
if ($result !== FALSE) {
|
51 |
-
return $result;
|
52 |
-
}
|
53 |
-
|
54 |
-
if (function_exists('json_last_error')) {
|
55 |
-
$message = self::$_messages[json_last_error()];
|
56 |
-
} else {
|
57 |
-
$message = __('One or more filenames isn\'t compatible with JSON encoding');
|
58 |
-
}
|
59 |
-
|
60 |
-
throw new RuntimeException($message);
|
61 |
-
}
|
62 |
-
|
63 |
-
public static function safeEncode($value)
|
64 |
-
{
|
65 |
-
$jsonString = json_encode($value);
|
66 |
-
|
67 |
-
if (($jsonString === false) || trim($jsonString) == '') {
|
68 |
-
$jsonString = self::customEncode($value);
|
69 |
-
|
70 |
-
if (($jsonString === false) || trim($jsonString) == '') {
|
71 |
-
throw new Exception('Unable to generate JSON from object');
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
return $jsonString;
|
76 |
-
}
|
77 |
-
|
78 |
-
public static function decode($json, $assoc = false)
|
79 |
-
{
|
80 |
-
$result = json_decode($json, $assoc);
|
81 |
-
|
82 |
-
if ($result) {
|
83 |
-
return $result;
|
84 |
-
}
|
85 |
-
|
86 |
-
if (function_exists('json_last_error')) {
|
87 |
-
throw new RuntimeException(self::$_messages[json_last_error()]);
|
88 |
-
} else {
|
89 |
-
throw new RuntimeException("DUP_JSON decode error");
|
90 |
-
}
|
91 |
-
|
92 |
-
}
|
93 |
-
|
94 |
-
private static function makeUTF8($mixed)
|
95 |
-
{
|
96 |
-
if (is_array($mixed)) {
|
97 |
-
foreach ($mixed as $key => $value) {
|
98 |
-
$mixed[$key] = self::makeUTF8($value);
|
99 |
-
}
|
100 |
-
} else if (is_string($mixed)) {
|
101 |
-
return utf8_encode($mixed);
|
102 |
-
}
|
103 |
-
return $mixed;
|
104 |
-
}
|
105 |
-
|
106 |
-
private static function escapeString($str)
|
107 |
-
{
|
108 |
-
return addcslashes($str, "\v\t\n\r\f\"\\/");
|
109 |
-
}
|
110 |
-
|
111 |
-
private static function oldCustomEncode($in)
|
112 |
-
{
|
113 |
-
$out = "";
|
114 |
-
|
115 |
-
if (is_object($in)) {
|
116 |
-
$arr[$key] = "\"".self::escapeString($key)."\":\"{$val}\"";
|
117 |
-
$in = get_object_vars($in);
|
118 |
-
}
|
119 |
-
|
120 |
-
if (is_array($in)) {
|
121 |
-
$obj = false;
|
122 |
-
$arr = array();
|
123 |
-
|
124 |
-
foreach ($in AS $key => $val) {
|
125 |
-
if (!is_numeric($key)) {
|
126 |
-
$obj = true;
|
127 |
-
}
|
128 |
-
$arr[$key] = self::oldCustomEncode($val);
|
129 |
-
}
|
130 |
-
|
131 |
-
if ($obj) {
|
132 |
-
foreach ($arr AS $key => $val) {
|
133 |
-
$arr[$key] = "\"".self::escapeString($key)."\":{$val}";
|
134 |
-
}
|
135 |
-
$val = implode(',', $arr);
|
136 |
-
$out .= "{{$val}}";
|
137 |
-
} else {
|
138 |
-
$val = implode(',', $arr);
|
139 |
-
$out .= "[{$val}]";
|
140 |
-
}
|
141 |
-
} elseif (is_bool($in)) {
|
142 |
-
$out .= $in ? 'true' : 'false';
|
143 |
-
} elseif (is_null($in)) {
|
144 |
-
$out .= 'null';
|
145 |
-
} elseif (is_string($in)) {
|
146 |
-
$out .= "\"".self::escapeString($in)."\"";
|
147 |
-
} else {
|
148 |
-
$out .= $in;
|
149 |
-
}
|
150 |
-
|
151 |
-
return "{$out}";
|
152 |
-
}
|
153 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DUP_JSON
|
4 |
+
{
|
5 |
+
protected static $_messages = array(
|
6 |
+
JSON_ERROR_NONE => 'No error has occurred',
|
7 |
+
JSON_ERROR_DEPTH => 'The maximum stack depth has been exceeded',
|
8 |
+
JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON',
|
9 |
+
JSON_ERROR_CTRL_CHAR => 'Control character error, possibly incorrectly encoded',
|
10 |
+
JSON_ERROR_SYNTAX => 'Syntax error',
|
11 |
+
JSON_ERROR_UTF8 => 'Malformed UTF-8 characters. To resolve see https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=malformed_utf8#faq-package-170-q'
|
12 |
+
);
|
13 |
+
|
14 |
+
public static function customEncode($value, $iteration = 1)
|
15 |
+
{
|
16 |
+
if (DUP_Util::$on_php_53_plus) {
|
17 |
+
|
18 |
+
$encoded = json_encode($value);
|
19 |
+
|
20 |
+
switch (json_last_error()) {
|
21 |
+
case JSON_ERROR_NONE:
|
22 |
+
return $encoded;
|
23 |
+
case JSON_ERROR_DEPTH:
|
24 |
+
throw new RuntimeException('Maximum stack depth exceeded');
|
25 |
+
case JSON_ERROR_STATE_MISMATCH:
|
26 |
+
throw new RuntimeException('Underflow or the modes mismatch');
|
27 |
+
case JSON_ERROR_CTRL_CHAR:
|
28 |
+
throw new RuntimeException('Unexpected control character found');
|
29 |
+
case JSON_ERROR_SYNTAX:
|
30 |
+
throw new RuntimeException('Syntax error, malformed JSON');
|
31 |
+
case JSON_ERROR_UTF8:
|
32 |
+
if ($iteration == 1) {
|
33 |
+
$clean = self::makeUTF8($value);
|
34 |
+
return self::customEncode($clean, $iteration + 1);
|
35 |
+
} else {
|
36 |
+
throw new RuntimeException('UTF-8 error loop');
|
37 |
+
}
|
38 |
+
default:
|
39 |
+
throw new RuntimeException('Unknown error');
|
40 |
+
}
|
41 |
+
} else {
|
42 |
+
return self::oldCustomEncode($value);
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
public static function encode($value, $options = 0)
|
47 |
+
{
|
48 |
+
$result = json_encode($value, $options);
|
49 |
+
|
50 |
+
if ($result !== FALSE) {
|
51 |
+
return $result;
|
52 |
+
}
|
53 |
+
|
54 |
+
if (function_exists('json_last_error')) {
|
55 |
+
$message = self::$_messages[json_last_error()];
|
56 |
+
} else {
|
57 |
+
$message = __('One or more filenames isn\'t compatible with JSON encoding');
|
58 |
+
}
|
59 |
+
|
60 |
+
throw new RuntimeException($message);
|
61 |
+
}
|
62 |
+
|
63 |
+
public static function safeEncode($value)
|
64 |
+
{
|
65 |
+
$jsonString = json_encode($value);
|
66 |
+
|
67 |
+
if (($jsonString === false) || trim($jsonString) == '') {
|
68 |
+
$jsonString = self::customEncode($value);
|
69 |
+
|
70 |
+
if (($jsonString === false) || trim($jsonString) == '') {
|
71 |
+
throw new Exception('Unable to generate JSON from object');
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
return $jsonString;
|
76 |
+
}
|
77 |
+
|
78 |
+
public static function decode($json, $assoc = false)
|
79 |
+
{
|
80 |
+
$result = json_decode($json, $assoc);
|
81 |
+
|
82 |
+
if ($result) {
|
83 |
+
return $result;
|
84 |
+
}
|
85 |
+
|
86 |
+
if (function_exists('json_last_error')) {
|
87 |
+
throw new RuntimeException(self::$_messages[json_last_error()]);
|
88 |
+
} else {
|
89 |
+
throw new RuntimeException("DUP_JSON decode error");
|
90 |
+
}
|
91 |
+
|
92 |
+
}
|
93 |
+
|
94 |
+
private static function makeUTF8($mixed)
|
95 |
+
{
|
96 |
+
if (is_array($mixed)) {
|
97 |
+
foreach ($mixed as $key => $value) {
|
98 |
+
$mixed[$key] = self::makeUTF8($value);
|
99 |
+
}
|
100 |
+
} else if (is_string($mixed)) {
|
101 |
+
return utf8_encode($mixed);
|
102 |
+
}
|
103 |
+
return $mixed;
|
104 |
+
}
|
105 |
+
|
106 |
+
private static function escapeString($str)
|
107 |
+
{
|
108 |
+
return addcslashes($str, "\v\t\n\r\f\"\\/");
|
109 |
+
}
|
110 |
+
|
111 |
+
private static function oldCustomEncode($in)
|
112 |
+
{
|
113 |
+
$out = "";
|
114 |
+
|
115 |
+
if (is_object($in)) {
|
116 |
+
$arr[$key] = "\"".self::escapeString($key)."\":\"{$val}\"";
|
117 |
+
$in = get_object_vars($in);
|
118 |
+
}
|
119 |
+
|
120 |
+
if (is_array($in)) {
|
121 |
+
$obj = false;
|
122 |
+
$arr = array();
|
123 |
+
|
124 |
+
foreach ($in AS $key => $val) {
|
125 |
+
if (!is_numeric($key)) {
|
126 |
+
$obj = true;
|
127 |
+
}
|
128 |
+
$arr[$key] = self::oldCustomEncode($val);
|
129 |
+
}
|
130 |
+
|
131 |
+
if ($obj) {
|
132 |
+
foreach ($arr AS $key => $val) {
|
133 |
+
$arr[$key] = "\"".self::escapeString($key)."\":{$val}";
|
134 |
+
}
|
135 |
+
$val = implode(',', $arr);
|
136 |
+
$out .= "{{$val}}";
|
137 |
+
} else {
|
138 |
+
$val = implode(',', $arr);
|
139 |
+
$out .= "[{$val}]";
|
140 |
+
}
|
141 |
+
} elseif (is_bool($in)) {
|
142 |
+
$out .= $in ? 'true' : 'false';
|
143 |
+
} elseif (is_null($in)) {
|
144 |
+
$out .= 'null';
|
145 |
+
} elseif (is_string($in)) {
|
146 |
+
$out .= "\"".self::escapeString($in)."\"";
|
147 |
+
} else {
|
148 |
+
$out .= $in;
|
149 |
+
}
|
150 |
+
|
151 |
+
return "{$out}";
|
152 |
+
}
|
153 |
}
|
classes/utilities/class.u.php
CHANGED
@@ -536,7 +536,7 @@ class DUP_Util
|
|
536 |
);
|
537 |
|
538 |
foreach ($possible_paths as $path) {
|
539 |
-
if (file_exists($path)) {
|
540 |
$filepath = $path;
|
541 |
break;
|
542 |
}
|
536 |
);
|
537 |
|
538 |
foreach ($possible_paths as $path) {
|
539 |
+
if (@file_exists($path)) {
|
540 |
$filepath = $path;
|
541 |
break;
|
542 |
}
|
define.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
//Prevent directly browsing to the file
|
3 |
if (function_exists('plugin_dir_url'))
|
4 |
{
|
5 |
-
define('DUPLICATOR_VERSION', '1.2.
|
6 |
define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
|
7 |
define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
|
8 |
define('DUPLICATOR_SITE_URL', get_site_url());
|
@@ -44,7 +44,7 @@ if (function_exists('plugin_dir_url'))
|
|
44 |
define('DUPLICATOR_SCAN_DB_TBL_ROWS', 100000); //100K rows per table
|
45 |
define('DUPLICATOR_SCAN_DB_TBL_SIZE', 10485760); //10MB Table
|
46 |
define('DUPLICATOR_SCAN_TIMEOUT', 150); //Seconds
|
47 |
-
define('DUPLICATOR_SCAN_MIN_WP', '4.
|
48 |
|
49 |
$GLOBALS['DUPLICATOR_SERVER_LIST'] = array('Apache','LiteSpeed', 'Nginx', 'Lighttpd', 'IIS', 'WebServerX', 'uWSGI');
|
50 |
$GLOBALS['DUPLICATOR_OPTS_DELETE'] = array('duplicator_ui_view_state', 'duplicator_package_active', 'duplicator_settings');
|
2 |
//Prevent directly browsing to the file
|
3 |
if (function_exists('plugin_dir_url'))
|
4 |
{
|
5 |
+
define('DUPLICATOR_VERSION', '1.2.20');
|
6 |
define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
|
7 |
define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
|
8 |
define('DUPLICATOR_SITE_URL', get_site_url());
|
44 |
define('DUPLICATOR_SCAN_DB_TBL_ROWS', 100000); //100K rows per table
|
45 |
define('DUPLICATOR_SCAN_DB_TBL_SIZE', 10485760); //10MB Table
|
46 |
define('DUPLICATOR_SCAN_TIMEOUT', 150); //Seconds
|
47 |
+
define('DUPLICATOR_SCAN_MIN_WP', '4.7.0');
|
48 |
|
49 |
$GLOBALS['DUPLICATOR_SERVER_LIST'] = array('Apache','LiteSpeed', 'Nginx', 'Lighttpd', 'IIS', 'WebServerX', 'uWSGI');
|
50 |
$GLOBALS['DUPLICATOR_OPTS_DELETE'] = array('duplicator_ui_view_state', 'duplicator_package_active', 'duplicator_settings');
|
duplicator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Duplicator
|
4 |
Plugin URI: http://www.lifeinthegrid.com/duplicator/
|
5 |
Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
|
6 |
-
Version: 1.2.
|
7 |
Author: Snap Creek
|
8 |
Author URI: http://www.snapcreek.com/duplicator/
|
9 |
Text Domain: duplicator
|
3 |
Plugin Name: Duplicator
|
4 |
Plugin URI: http://www.lifeinthegrid.com/duplicator/
|
5 |
Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
|
6 |
+
Version: 1.2.20
|
7 |
Author: Snap Creek
|
8 |
Author URI: http://www.snapcreek.com/duplicator/
|
9 |
Text Domain: duplicator
|
installer/build/assets/inc.css.php
CHANGED
@@ -95,7 +95,7 @@
|
|
95 |
|
96 |
/*Terms and Notices*/
|
97 |
div#s1-warning-check label{cursor:pointer;}
|
98 |
-
div#s1-warning-msg {padding:5px;font-size:12px; color:#333; line-height:14px;font-style:italic; overflow-y:scroll; height:
|
99 |
div#s1-warning-check {padding:3px; font-size:14px; font-weight:normal;}
|
100 |
input#accept-warnings {height: 17px; width:17px}
|
101 |
|
95 |
|
96 |
/*Terms and Notices*/
|
97 |
div#s1-warning-check label{cursor:pointer;}
|
98 |
+
div#s1-warning-msg {padding:5px;font-size:12px; color:#333; line-height:14px;font-style:italic; overflow-y:scroll; height:250px; border:1px solid #dfdfdf; background:#fff; border-radius:3px}
|
99 |
div#s1-warning-check {padding:3px; font-size:14px; font-weight:normal;}
|
100 |
input#accept-warnings {height: 17px; width:17px}
|
101 |
|
installer/build/classes/class.logging.php
CHANGED
@@ -1,66 +1,66 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
define('ERR_CONFIG_FOUND', 'A wp-config.php already exists in this location. This error prevents users from accidentally overwriting the wrong directories contents. You have three options: <ul><li>Empty this root directory except for the package and installer and try again.</li><li>Delete just the wp-config.php file and try again. This will over-write all other files in the directory.</li><li>Check the "Manual package extraction" checkbox under advanced options to skip extraction</li></ul>');
|
4 |
-
define('ERR_ZIPNOTFOUND', 'The packaged zip file was not found. Be sure the zip package is in the same directory as the installer file and as the correct permissions. If you are trying to reinstall a package you can copy the package from the "' . DUPLICATOR_SSDIR_NAME . '" directory back up to your root which is the same location as your installer.php file.');
|
5 |
-
define('ERR_ZIPOPEN', 'Failed to open zip archive file. Please be sure the archive is completely downloaded before running the installer. Try to extract the archive manually to make sure the file is not corrupted.');
|
6 |
-
define('ERR_ZIPEXTRACTION', 'Errors extracting zip file. Portions or part of the zip archive did not extract correctly. Try to extract the archive manually with a client side program like unzip/win-zip/winrar or your hosts cPanel to make sure the file is not corrupted. If the file extracts correctly then there is an invalid file or directory that PHP is unable to extract. This can happen if your moving from one operating system to another where certain naming conventions work on one environment and not another. <br/><br/> <b>Workarounds:</b> <br/> 1. Create a new package and be sure to exclude any directories that have invalid names or files in them. This warning will be displayed on the scan results under "Name Checks". <br/> 2. Manually extract the zip file with a client side program or your hosts cPanel. Then under options in step 1 of this installer check the "Manual Archive Extraction" option and perform the install.');
|
7 |
-
define('ERR_ZIPMANUAL', 'When choosing manual package extraction, the contents of the package must already be extracted and the wp-config.php and database.sql files must be present in the same directory as the installer.php for the process to continue. Please manually extract the package into the current directory before continuing in manual extraction mode. Also validate that the wp-config.php and database.sql files are present.');
|
8 |
-
define('ERR_MAKELOG', 'PHP is having issues writing to the log file <b>' . DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']) . '\installer-log.txt .</b> In order for the Duplicator to proceed validate your owner/group and permission settings for PHP on this path. Try temporarily setting you permissions to 777 to see if the issue gets resolved. If you are on a shared hosting environment please contact your hosting company and tell them you are getting errors writing files to the path above when using PHP.');
|
9 |
-
define('ERR_ZIPARCHIVE', 'In order to extract the archive.zip file the PHP ZipArchive module must be installed. Please read the FAQ for more details. You can still install this package but you will need to check the Manual package extraction checkbox found in the Advanced Options. Please read the online user guide for details in performing a manual package extraction.');
|
10 |
-
define('ERR_MYSQLI_SUPPORT', 'In order to complete an install the mysqli extension for PHP is required. If you are on a hosted server please contact your host and request that mysqli be enabled. For more information visit: http://php.net/manual/en/mysqli.installation.php');
|
11 |
-
define('ERR_DBCONNECT', 'DATABASE CONNECTION FAILED!<br/>');
|
12 |
-
define('ERR_DBCONNECT_CREATE', 'DATABASE CREATION FAILURE!<br/> Unable to create database "%s". Check to make sure the user has "Create" privileges. Some hosts will restrict creation of a database only through the cpanel. Try creating the database manually to proceed with installation. If the database already exists then check the radio button labeled "Connect and Remove All Data" which will remove all existing tables.');
|
13 |
-
define('ERR_DBTRYCLEAN', 'DATABASE CREATION FAILURE!<br/> Unable to remove all tables from database "%s".<br/> Please remove all tables from this database and try the installation again.');
|
14 |
-
define('ERR_DBCREATE', 'The database "%s" does not exists.<br/> Change mode to create in order to create a new database.');
|
15 |
-
define('ERR_DBEMPTY', 'The database "%s" has "%s" tables. The Duplicator only works with an EMPTY database. Enable the action "Connect and Remove All Data" radio button to remove all tables and or create a new database. Some hosting providers do not allow table removal from scripts. In this case you will need to login to your hosting providers control panel and remove the tables manually. Please contact your hosting provider for further details. Always backup all your data before proceeding!');
|
16 |
-
define('ERR_TESTDB_UTF8', 'UTF8 Characters were detected as part of the database connection string. If your connection fails be sure to update the MySQL my.ini configuration file setting to support UTF8 characters by enabling this option [character_set_server=utf8] and restarting the database server.');
|
17 |
-
define('ERR_TESTDB_VERSION_INFO', 'The current version detected was released prior to MySQL 5.5.3 which had a release date of April 8th 2010. WordPress 4.2 included support for utf8mb4 which is only supported in MySQL server 5.5.3+. It is highly recommended to upgrade your version of MySQL server on this server to be more compatible with recent releases of WordPress and avoid issues with install errors.');
|
18 |
-
define('ERR_TESTDB_VERSION_COMPAT', 'In order to avoid database incompatibility issues make sure the database versions between the build and installer servers are as close as possible. If the package was created on a newer database version than where it is being installed then you might run into issues.<br/><br/> It is best to make sure the server where the installer is running has the same or higher version number than where it was built. If the major and minor version are the same or close for example [5.7 to 5.6], then the migration should work without issues. A version pair of [5.7 to 5.1] is more likely to cause issues unless you have a very simple setup. If the versions are too far apart work with your hosting provider to upgrade the MySQL engine on this server.<br/><br/> <b>MariaDB:</b> If see a version of 10.N.N then the database distribution is a MariaDB flavor of MySQL. While the distributions are very close there are some subtle differences. Some operating systems will report the version such as "5.5.5-10.1.21-MariaDB" showing the correlation of both. Please visit the online <a href="https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/" target="_blank">MariaDB versus MySQL - Compatibility</a> page for more details.<br/><br/> Please note these messages are simply notices. It is highly recommended that you continue with the install process and closely monitor the installer-log.txt file along with the install report found on step 3 of the installer. Be sure to look for any notices/warnings/errors in these locations to validate the install process did not detect any errors. If any issues are found please visit the FAQ pages and see the question <a href="https://snapcreek.com/duplicator/docs/faqs-tech
|
19 |
-
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Class used to log information to the installer-log.txt file
|
23 |
-
*
|
24 |
-
* Standard: PSR-2
|
25 |
-
* @link http://www.php-fig.org/psr/psr-2 Full Documentation
|
26 |
-
*
|
27 |
-
* @package SC\DUPX\Log
|
28 |
-
*
|
29 |
-
*/
|
30 |
-
class DUPX_Log
|
31 |
-
{
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Used to write debug info to the text log file
|
35 |
-
*
|
36 |
-
* @param string $msg Any text data
|
37 |
-
* @param int $loglevel Log level
|
38 |
-
*
|
39 |
-
* @return string Write info to both the log and browser
|
40 |
-
*/
|
41 |
-
public static function info($msg, $logging = 1)
|
42 |
-
{
|
43 |
-
if ($logging <= $GLOBALS["LOGGING"]) {
|
44 |
-
@fwrite($GLOBALS["LOG_FILE_HANDLE"], "{$msg}\n");
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Used to write errors to the text log file
|
50 |
-
*
|
51 |
-
* @param string $msg Any text data
|
52 |
-
* @param int $loglevel Log level
|
53 |
-
*
|
54 |
-
* @return string Write errors to both the log and browser
|
55 |
-
*/
|
56 |
-
public static function error($msg)
|
57 |
-
{
|
58 |
-
$breaks = array("<br />","<br>","<br/>");
|
59 |
-
$log_msg = str_ireplace($breaks, "\r\n", $msg);
|
60 |
-
$log_msg = strip_tags($log_msg);
|
61 |
-
@fwrite($GLOBALS["LOG_FILE_HANDLE"], "\nINSTALLER ERROR:\n{$log_msg}\n");
|
62 |
-
@fclose($GLOBALS["LOG_FILE_HANDLE"]);
|
63 |
-
die("<div class='dupx-ui-error'><hr size='1' /><b style='color:#B80000;'>INSTALL ERROR!</b><br/>{$msg}</div>");
|
64 |
-
}
|
65 |
-
}
|
66 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
define('ERR_CONFIG_FOUND', 'A wp-config.php already exists in this location. This error prevents users from accidentally overwriting the wrong directories contents. You have three options: <ul><li>Empty this root directory except for the package and installer and try again.</li><li>Delete just the wp-config.php file and try again. This will over-write all other files in the directory.</li><li>Check the "Manual package extraction" checkbox under advanced options to skip extraction</li></ul>');
|
4 |
+
define('ERR_ZIPNOTFOUND', 'The packaged zip file was not found. Be sure the zip package is in the same directory as the installer file and as the correct permissions. If you are trying to reinstall a package you can copy the package from the "' . DUPLICATOR_SSDIR_NAME . '" directory back up to your root which is the same location as your installer.php file.');
|
5 |
+
define('ERR_ZIPOPEN', 'Failed to open zip archive file. Please be sure the archive is completely downloaded before running the installer. Try to extract the archive manually to make sure the file is not corrupted.');
|
6 |
+
define('ERR_ZIPEXTRACTION', 'Errors extracting zip file. Portions or part of the zip archive did not extract correctly. Try to extract the archive manually with a client side program like unzip/win-zip/winrar or your hosts cPanel to make sure the file is not corrupted. If the file extracts correctly then there is an invalid file or directory that PHP is unable to extract. This can happen if your moving from one operating system to another where certain naming conventions work on one environment and not another. <br/><br/> <b>Workarounds:</b> <br/> 1. Create a new package and be sure to exclude any directories that have invalid names or files in them. This warning will be displayed on the scan results under "Name Checks". <br/> 2. Manually extract the zip file with a client side program or your hosts cPanel. Then under options in step 1 of this installer check the "Manual Archive Extraction" option and perform the install.');
|
7 |
+
define('ERR_ZIPMANUAL', 'When choosing manual package extraction, the contents of the package must already be extracted and the wp-config.php and database.sql files must be present in the same directory as the installer.php for the process to continue. Please manually extract the package into the current directory before continuing in manual extraction mode. Also validate that the wp-config.php and database.sql files are present.');
|
8 |
+
define('ERR_MAKELOG', 'PHP is having issues writing to the log file <b>' . DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']) . '\installer-log.txt .</b> In order for the Duplicator to proceed validate your owner/group and permission settings for PHP on this path. Try temporarily setting you permissions to 777 to see if the issue gets resolved. If you are on a shared hosting environment please contact your hosting company and tell them you are getting errors writing files to the path above when using PHP.');
|
9 |
+
define('ERR_ZIPARCHIVE', 'In order to extract the archive.zip file the PHP ZipArchive module must be installed. Please read the FAQ for more details. You can still install this package but you will need to check the Manual package extraction checkbox found in the Advanced Options. Please read the online user guide for details in performing a manual package extraction.');
|
10 |
+
define('ERR_MYSQLI_SUPPORT', 'In order to complete an install the mysqli extension for PHP is required. If you are on a hosted server please contact your host and request that mysqli be enabled. For more information visit: http://php.net/manual/en/mysqli.installation.php');
|
11 |
+
define('ERR_DBCONNECT', 'DATABASE CONNECTION FAILED!<br/>');
|
12 |
+
define('ERR_DBCONNECT_CREATE', 'DATABASE CREATION FAILURE!<br/> Unable to create database "%s". Check to make sure the user has "Create" privileges. Some hosts will restrict creation of a database only through the cpanel. Try creating the database manually to proceed with installation. If the database already exists then check the radio button labeled "Connect and Remove All Data" which will remove all existing tables.');
|
13 |
+
define('ERR_DBTRYCLEAN', 'DATABASE CREATION FAILURE!<br/> Unable to remove all tables from database "%s".<br/> Please remove all tables from this database and try the installation again.');
|
14 |
+
define('ERR_DBCREATE', 'The database "%s" does not exists.<br/> Change mode to create in order to create a new database.');
|
15 |
+
define('ERR_DBEMPTY', 'The database "%s" has "%s" tables. The Duplicator only works with an EMPTY database. Enable the action "Connect and Remove All Data" radio button to remove all tables and or create a new database. Some hosting providers do not allow table removal from scripts. In this case you will need to login to your hosting providers control panel and remove the tables manually. Please contact your hosting provider for further details. Always backup all your data before proceeding!');
|
16 |
+
define('ERR_TESTDB_UTF8', 'UTF8 Characters were detected as part of the database connection string. If your connection fails be sure to update the MySQL my.ini configuration file setting to support UTF8 characters by enabling this option [character_set_server=utf8] and restarting the database server.');
|
17 |
+
define('ERR_TESTDB_VERSION_INFO', 'The current version detected was released prior to MySQL 5.5.3 which had a release date of April 8th 2010. WordPress 4.2 included support for utf8mb4 which is only supported in MySQL server 5.5.3+. It is highly recommended to upgrade your version of MySQL server on this server to be more compatible with recent releases of WordPress and avoid issues with install errors.');
|
18 |
+
define('ERR_TESTDB_VERSION_COMPAT', 'In order to avoid database incompatibility issues make sure the database versions between the build and installer servers are as close as possible. If the package was created on a newer database version than where it is being installed then you might run into issues.<br/><br/> It is best to make sure the server where the installer is running has the same or higher version number than where it was built. If the major and minor version are the same or close for example [5.7 to 5.6], then the migration should work without issues. A version pair of [5.7 to 5.1] is more likely to cause issues unless you have a very simple setup. If the versions are too far apart work with your hosting provider to upgrade the MySQL engine on this server.<br/><br/> <b>MariaDB:</b> If see a version of 10.N.N then the database distribution is a MariaDB flavor of MySQL. While the distributions are very close there are some subtle differences. Some operating systems will report the version such as "5.5.5-10.1.21-MariaDB" showing the correlation of both. Please visit the online <a href="https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/" target="_blank">MariaDB versus MySQL - Compatibility</a> page for more details.<br/><br/> Please note these messages are simply notices. It is highly recommended that you continue with the install process and closely monitor the installer-log.txt file along with the install report found on step 3 of the installer. Be sure to look for any notices/warnings/errors in these locations to validate the install process did not detect any errors. If any issues are found please visit the FAQ pages and see the question <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=database_incompatibility#faq-installer-260-q" target="_blank">What if I get database errors or general warnings on the install report?</a>.');
|
19 |
+
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Class used to log information to the installer-log.txt file
|
23 |
+
*
|
24 |
+
* Standard: PSR-2
|
25 |
+
* @link http://www.php-fig.org/psr/psr-2 Full Documentation
|
26 |
+
*
|
27 |
+
* @package SC\DUPX\Log
|
28 |
+
*
|
29 |
+
*/
|
30 |
+
class DUPX_Log
|
31 |
+
{
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Used to write debug info to the text log file
|
35 |
+
*
|
36 |
+
* @param string $msg Any text data
|
37 |
+
* @param int $loglevel Log level
|
38 |
+
*
|
39 |
+
* @return string Write info to both the log and browser
|
40 |
+
*/
|
41 |
+
public static function info($msg, $logging = 1)
|
42 |
+
{
|
43 |
+
if ($logging <= $GLOBALS["LOGGING"]) {
|
44 |
+
@fwrite($GLOBALS["LOG_FILE_HANDLE"], "{$msg}\n");
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Used to write errors to the text log file
|
50 |
+
*
|
51 |
+
* @param string $msg Any text data
|
52 |
+
* @param int $loglevel Log level
|
53 |
+
*
|
54 |
+
* @return string Write errors to both the log and browser
|
55 |
+
*/
|
56 |
+
public static function error($msg)
|
57 |
+
{
|
58 |
+
$breaks = array("<br />","<br>","<br/>");
|
59 |
+
$log_msg = str_ireplace($breaks, "\r\n", $msg);
|
60 |
+
$log_msg = strip_tags($log_msg);
|
61 |
+
@fwrite($GLOBALS["LOG_FILE_HANDLE"], "\nINSTALLER ERROR:\n{$log_msg}\n");
|
62 |
+
@fclose($GLOBALS["LOG_FILE_HANDLE"]);
|
63 |
+
die("<div class='dupx-ui-error'><hr size='1' /><b style='color:#B80000;'>INSTALL ERROR!</b><br/>{$msg}</div>");
|
64 |
+
}
|
65 |
+
}
|
66 |
?>
|
installer/build/classes/class.server.php
CHANGED
@@ -31,14 +31,21 @@ class DUPX_Server
|
|
31 |
*/
|
32 |
public static $php_version_safe = false;
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
/**
|
35 |
-
* Used to init the
|
36 |
*/
|
37 |
public static function init()
|
38 |
{
|
39 |
-
self::$php_safe_mode_on
|
40 |
-
self::$php_version
|
41 |
-
self::$php_version_safe
|
|
|
42 |
}
|
43 |
|
44 |
/**
|
31 |
*/
|
32 |
public static $php_version_safe = false;
|
33 |
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Is PHP 5.3 or better running
|
37 |
+
*/
|
38 |
+
public static $php_version_53_plus;
|
39 |
+
|
40 |
/**
|
41 |
+
* Used to init the static properties
|
42 |
*/
|
43 |
public static function init()
|
44 |
{
|
45 |
+
self::$php_safe_mode_on = in_array(strtolower(@ini_get('safe_mode')), array('on', 'yes', 'true', 1, "1"));
|
46 |
+
self::$php_version = phpversion();
|
47 |
+
self::$php_version_safe = (version_compare(phpversion(), self::$php_version_min) >= 0);
|
48 |
+
self::$php_version_53_plus = version_compare(PHP_VERSION, '5.3.0') >= 0;
|
49 |
}
|
50 |
|
51 |
/**
|
installer/build/ctrls/ctrl.step2.php
CHANGED
@@ -1,417 +1,418 @@
|
|
1 |
-
<?php
|
2 |
-
//POST PARAMS
|
3 |
-
$_POST['dbaction'] = isset($_POST['dbaction']) ? $_POST['dbaction'] : 'create';
|
4 |
-
$_POST['dbnbsp'] = (isset($_POST['dbnbsp']) && $_POST['dbnbsp'] == '1') ? true : false;
|
5 |
-
$_POST['ssl_admin'] = (isset($_POST['ssl_admin'])) ? true : false;
|
6 |
-
$_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
|
7 |
-
$_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
|
8 |
-
$_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : null;
|
9 |
-
$_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
|
10 |
-
|
11 |
-
//LOGGING
|
12 |
-
$POST_LOG = $_POST;
|
13 |
-
unset($POST_LOG['dbpass']);
|
14 |
-
ksort($POST_LOG);
|
15 |
-
|
16 |
-
//PAGE VARS
|
17 |
-
$date_time = @date('h:i:s');
|
18 |
-
$root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
|
19 |
-
$ajax2_start = DUPX_U::getMicrotime();
|
20 |
-
$JSON = array();
|
21 |
-
$JSON['pass'] = 0;
|
22 |
-
|
23 |
-
/** JSON RESPONSE: Most sites have warnings turned off by default, but if they're turned on the warnings
|
24 |
-
cause errors in the JSON data Here we hide the status so warning level is reset at it at the end*/
|
25 |
-
$ajax1_error_level = error_reporting();
|
26 |
-
error_reporting(E_ERROR);
|
27 |
-
|
28 |
-
//====================================================================================================
|
29 |
-
//DATABASE TEST CONNECTION
|
30 |
-
//====================================================================================================
|
31 |
-
if (isset($_GET['dbtest']))
|
32 |
-
{
|
33 |
-
$html = "";
|
34 |
-
$baseport = parse_url($_POST['dbhost'], PHP_URL_PORT);
|
35 |
-
$dbConn = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
|
36 |
-
$dbErr = mysqli_connect_error();
|
37 |
-
|
38 |
-
$dbFound = mysqli_select_db($dbConn, $_POST['dbname']);
|
39 |
-
$port_view = (is_int($baseport) || substr($_POST['dbhost'], -1) == ":") ? "Port=[Set in Host]" : "Port={$_POST['dbport']}";
|
40 |
-
|
41 |
-
$tstSrv = ($dbConn) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
|
42 |
-
$tstDB = ($dbFound) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
|
43 |
-
|
44 |
-
$dbversion_info = DUPX_DB::getServerInfo($dbConn);
|
45 |
-
$dbversion_info = empty($dbversion_info) ? 'no connection' : $dbversion_info;
|
46 |
-
$dbversion_info_fail = version_compare(DUPX_DB::getVersion($dbConn), '5.5.3') < 0;
|
47 |
-
|
48 |
-
$dbversion_compat = DUPX_DB::getVersion($dbConn);
|
49 |
-
$dbversion_compat = empty($dbversion_compat) ? 'no connection' : $dbversion_compat;
|
50 |
-
$dbversion_compat_fail = version_compare($dbversion_compat, $GLOBALS['FW_VERSION_DB']) < 0;
|
51 |
-
|
52 |
-
$tstInfo = ($dbversion_info_fail)
|
53 |
-
? "<div class='dupx-notice'>{$dbversion_info}</div>"
|
54 |
-
: "<div class='dupx-pass'>{$dbversion_info}</div>";
|
55 |
-
|
56 |
-
$tstCompat = ($dbversion_compat_fail)
|
57 |
-
? "<div class='dupx-notice'>This Server: [{$dbversion_compat}] -- Package Server: [{$GLOBALS['FW_VERSION_DB']}]</div>"
|
58 |
-
: "<div class='dupx-pass'>This Server: [{$dbversion_compat}] -- Package Server: [{$GLOBALS['FW_VERSION_DB']}]</div>";
|
59 |
-
|
60 |
-
$html .= <<<DATA
|
61 |
-
<div class='s2-db-test'>
|
62 |
-
<small>
|
63 |
-
Using Connection String:<br/>
|
64 |
-
Host={$_POST['dbhost']}; Database={$_POST['dbname']}; Uid={$_POST['dbuser']}; Pwd={$_POST['dbpass']}; {$port_view}
|
65 |
-
</small>
|
66 |
-
<table class='s2-db-test-dtls'>
|
67 |
-
<tr>
|
68 |
-
<td>Host:</td>
|
69 |
-
<td>{$tstSrv}</td>
|
70 |
-
</tr>
|
71 |
-
<tr>
|
72 |
-
<td>Database:</td>
|
73 |
-
<td>{$tstDB}</td>
|
74 |
-
</tr>
|
75 |
-
<tr>
|
76 |
-
<td>Version:</td>
|
77 |
-
<td>{$tstInfo}</td>
|
78 |
-
</tr>
|
79 |
-
<tr>
|
80 |
-
<td>Compatibility:</td>
|
81 |
-
<td>{$tstCompat}</td>
|
82 |
-
</tr>
|
83 |
-
</table>
|
84 |
-
DATA;
|
85 |
-
|
86 |
-
//--------------------------------
|
87 |
-
//WARNING: DB has tables with create option
|
88 |
-
if ($_POST['dbaction'] == 'create')
|
89 |
-
{
|
90 |
-
$tblcount = DUPX_DB::countTables($dbConn, $_POST['dbname']);
|
91 |
-
$html .= ($tblcount > 0)
|
92 |
-
? "<div class='warn-msg'><b>WARNING:</b> " . sprintf(ERR_DBEMPTY, $_POST['dbname'], $tblcount) . "</div>"
|
93 |
-
: '';
|
94 |
-
}
|
95 |
-
|
96 |
-
//WARNNG: Input has utf8
|
97 |
-
$dbConnItems = array($_POST['dbhost'], $_POST['dbuser'], $_POST['dbname'],$_POST['dbpass']);
|
98 |
-
$dbUTF8_tst = false;
|
99 |
-
foreach ($dbConnItems as $value)
|
100 |
-
{
|
101 |
-
if (DUPX_U::isNonASCII($value)) {
|
102 |
-
$dbUTF8_tst = true;
|
103 |
-
break;
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
//WARNING: UTF8 Data in Connection String
|
108 |
-
$html .= (! $dbConn && $dbUTF8_tst)
|
109 |
-
? "<div class='warn-msg'><b>WARNING:</b> " . ERR_TESTDB_UTF8 . "</div>"
|
110 |
-
: '';
|
111 |
-
|
112 |
-
//NOTICE: Version Too Low
|
113 |
-
$html .= ($dbversion_info_fail)
|
114 |
-
? "<div class='warn-msg'><b>NOTICE:</b> " . ERR_TESTDB_VERSION_INFO . "</div>"
|
115 |
-
: '';
|
116 |
-
|
117 |
-
//NOTICE: Version Incompatibility
|
118 |
-
$html .= ($dbversion_compat_fail)
|
119 |
-
? "<div class='warn-msg'><b>NOTICE:</b> " . ERR_TESTDB_VERSION_COMPAT . "</div>"
|
120 |
-
: '';
|
121 |
-
|
122 |
-
$html .= "</div>";
|
123 |
-
die($html);
|
124 |
-
}
|
125 |
-
|
126 |
-
//===============================
|
127 |
-
//ERROR MESSAGES
|
128 |
-
//===============================
|
129 |
-
//ERR_MAKELOG
|
130 |
-
($GLOBALS['LOG_FILE_HANDLE'] != false) or DUPX_Log::error(ERR_MAKELOG);
|
131 |
-
|
132 |
-
//ERR_MYSQLI_SUPPORT
|
133 |
-
function_exists('mysqli_connect') or DUPX_Log::error(ERR_MYSQLI_SUPPORT);
|
134 |
-
|
135 |
-
//ERR_DBCONNECT
|
136 |
-
$dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
|
137 |
-
@mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
|
138 |
-
($dbh) or DUPX_Log::error(ERR_DBCONNECT . mysqli_connect_error());
|
139 |
-
if ($_POST['dbaction'] == 'empty') {
|
140 |
-
mysqli_select_db($dbh, $_POST['dbname']) or DUPX_Log::error(sprintf(ERR_DBCREATE, $_POST['dbname']));
|
141 |
-
}
|
142 |
-
//ERR_DBEMPTY
|
143 |
-
if ($_POST['dbaction'] == 'create' ) {
|
144 |
-
$tblcount = DUPX_DB::countTables($dbh, $_POST['dbname']);
|
145 |
-
if ($tblcount > 0) {
|
146 |
-
DUPX_Log::error(sprintf(ERR_DBEMPTY, $_POST['dbname'], $tblcount));
|
147 |
-
}
|
148 |
-
}
|
149 |
-
|
150 |
-
$log = <<<LOG
|
151 |
-
\n\n********************************************************************************
|
152 |
-
* DUPLICATOR-LITE: INSTALL-LOG
|
153 |
-
* STEP-2 START @ {$date_time}
|
154 |
-
* NOTICE: Do NOT post to public sites or forums
|
155 |
-
********************************************************************************
|
156 |
-
LOG;
|
157 |
-
DUPX_Log::info($log);
|
158 |
-
|
159 |
-
$log = "--------------------------------------\n";
|
160 |
-
$log .= "POST DATA\n";
|
161 |
-
$log .= "--------------------------------------\n";
|
162 |
-
$log .= print_r($POST_LOG, true);
|
163 |
-
DUPX_Log::info($log, 2);
|
164 |
-
|
165 |
-
|
166 |
-
//====================================================================================================
|
167 |
-
//DATABASE ROUTINES
|
168 |
-
//====================================================================================================
|
169 |
-
$log = '';
|
170 |
-
$faq_url = $GLOBALS['FAQ_URL'];
|
171 |
-
$
|
172 |
-
$
|
173 |
-
$
|
174 |
-
$php_mem_range = $
|
175 |
-
|
176 |
-
|
177 |
-
//
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
$
|
182 |
-
$msg
|
183 |
-
$msg .= "
|
184 |
-
$msg .= "
|
185 |
-
$msg .= "
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
$
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
$msg
|
197 |
-
$msg .= " -
|
198 |
-
$msg .= "
|
199 |
-
|
200 |
-
$msg .= "
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
//
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
$
|
215 |
-
$
|
216 |
-
$
|
217 |
-
$
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
$
|
224 |
-
$msg
|
225 |
-
$msg .= "-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
@mysqli_query($dbh, "SET
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
//
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
$
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
$
|
249 |
-
$log
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
$
|
257 |
-
$
|
258 |
-
$
|
259 |
-
$
|
260 |
-
$
|
261 |
-
$
|
262 |
-
$
|
263 |
-
$
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
DUPX_Log::info("
|
268 |
-
DUPX_Log::info("
|
269 |
-
DUPX_Log::info("
|
270 |
-
DUPX_Log::info("
|
271 |
-
DUPX_Log::info("
|
272 |
-
DUPX_Log::info("
|
273 |
-
DUPX_Log::info("
|
274 |
-
DUPX_Log::info("
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
}
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
$
|
292 |
-
$
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
DUPX_Log::info("
|
314 |
-
DUPX_Log::info("
|
315 |
-
|
316 |
-
$
|
317 |
-
$
|
318 |
-
$
|
319 |
-
$
|
320 |
-
$
|
321 |
-
$
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
$
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
$
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
$dbh
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
$
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
@
|
364 |
-
|
365 |
-
|
366 |
-
DUPX_Log::info("
|
367 |
-
DUPX_Log::info("
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
$
|
374 |
-
|
375 |
-
$
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
//
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
@
|
393 |
-
$
|
394 |
-
$
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
}
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
$
|
406 |
-
$
|
407 |
-
|
408 |
-
DUPX_Log::info(
|
409 |
-
|
410 |
-
|
411 |
-
$JSON['
|
412 |
-
$JSON['
|
413 |
-
$JSON['
|
414 |
-
|
415 |
-
|
416 |
-
|
|
|
417 |
?>
|
1 |
+
<?php
|
2 |
+
//POST PARAMS
|
3 |
+
$_POST['dbaction'] = isset($_POST['dbaction']) ? $_POST['dbaction'] : 'create';
|
4 |
+
$_POST['dbnbsp'] = (isset($_POST['dbnbsp']) && $_POST['dbnbsp'] == '1') ? true : false;
|
5 |
+
$_POST['ssl_admin'] = (isset($_POST['ssl_admin'])) ? true : false;
|
6 |
+
$_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
|
7 |
+
$_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
|
8 |
+
$_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : null;
|
9 |
+
$_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
|
10 |
+
|
11 |
+
//LOGGING
|
12 |
+
$POST_LOG = $_POST;
|
13 |
+
unset($POST_LOG['dbpass']);
|
14 |
+
ksort($POST_LOG);
|
15 |
+
|
16 |
+
//PAGE VARS
|
17 |
+
$date_time = @date('h:i:s');
|
18 |
+
$root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
|
19 |
+
$ajax2_start = DUPX_U::getMicrotime();
|
20 |
+
$JSON = array();
|
21 |
+
$JSON['pass'] = 0;
|
22 |
+
|
23 |
+
/** JSON RESPONSE: Most sites have warnings turned off by default, but if they're turned on the warnings
|
24 |
+
cause errors in the JSON data Here we hide the status so warning level is reset at it at the end*/
|
25 |
+
$ajax1_error_level = error_reporting();
|
26 |
+
error_reporting(E_ERROR);
|
27 |
+
|
28 |
+
//====================================================================================================
|
29 |
+
//DATABASE TEST CONNECTION
|
30 |
+
//====================================================================================================
|
31 |
+
if (isset($_GET['dbtest']))
|
32 |
+
{
|
33 |
+
$html = "";
|
34 |
+
$baseport = parse_url($_POST['dbhost'], PHP_URL_PORT);
|
35 |
+
$dbConn = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
|
36 |
+
$dbErr = mysqli_connect_error();
|
37 |
+
|
38 |
+
$dbFound = mysqli_select_db($dbConn, $_POST['dbname']);
|
39 |
+
$port_view = (is_int($baseport) || substr($_POST['dbhost'], -1) == ":") ? "Port=[Set in Host]" : "Port={$_POST['dbport']}";
|
40 |
+
|
41 |
+
$tstSrv = ($dbConn) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
|
42 |
+
$tstDB = ($dbFound) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
|
43 |
+
|
44 |
+
$dbversion_info = DUPX_DB::getServerInfo($dbConn);
|
45 |
+
$dbversion_info = empty($dbversion_info) ? 'no connection' : $dbversion_info;
|
46 |
+
$dbversion_info_fail = version_compare(DUPX_DB::getVersion($dbConn), '5.5.3') < 0;
|
47 |
+
|
48 |
+
$dbversion_compat = DUPX_DB::getVersion($dbConn);
|
49 |
+
$dbversion_compat = empty($dbversion_compat) ? 'no connection' : $dbversion_compat;
|
50 |
+
$dbversion_compat_fail = version_compare($dbversion_compat, $GLOBALS['FW_VERSION_DB']) < 0;
|
51 |
+
|
52 |
+
$tstInfo = ($dbversion_info_fail)
|
53 |
+
? "<div class='dupx-notice'>{$dbversion_info}</div>"
|
54 |
+
: "<div class='dupx-pass'>{$dbversion_info}</div>";
|
55 |
+
|
56 |
+
$tstCompat = ($dbversion_compat_fail)
|
57 |
+
? "<div class='dupx-notice'>This Server: [{$dbversion_compat}] -- Package Server: [{$GLOBALS['FW_VERSION_DB']}]</div>"
|
58 |
+
: "<div class='dupx-pass'>This Server: [{$dbversion_compat}] -- Package Server: [{$GLOBALS['FW_VERSION_DB']}]</div>";
|
59 |
+
|
60 |
+
$html .= <<<DATA
|
61 |
+
<div class='s2-db-test'>
|
62 |
+
<small>
|
63 |
+
Using Connection String:<br/>
|
64 |
+
Host={$_POST['dbhost']}; Database={$_POST['dbname']}; Uid={$_POST['dbuser']}; Pwd={$_POST['dbpass']}; {$port_view}
|
65 |
+
</small>
|
66 |
+
<table class='s2-db-test-dtls'>
|
67 |
+
<tr>
|
68 |
+
<td>Host:</td>
|
69 |
+
<td>{$tstSrv}</td>
|
70 |
+
</tr>
|
71 |
+
<tr>
|
72 |
+
<td>Database:</td>
|
73 |
+
<td>{$tstDB}</td>
|
74 |
+
</tr>
|
75 |
+
<tr>
|
76 |
+
<td>Version:</td>
|
77 |
+
<td>{$tstInfo}</td>
|
78 |
+
</tr>
|
79 |
+
<tr>
|
80 |
+
<td>Compatibility:</td>
|
81 |
+
<td>{$tstCompat}</td>
|
82 |
+
</tr>
|
83 |
+
</table>
|
84 |
+
DATA;
|
85 |
+
|
86 |
+
//--------------------------------
|
87 |
+
//WARNING: DB has tables with create option
|
88 |
+
if ($_POST['dbaction'] == 'create')
|
89 |
+
{
|
90 |
+
$tblcount = DUPX_DB::countTables($dbConn, $_POST['dbname']);
|
91 |
+
$html .= ($tblcount > 0)
|
92 |
+
? "<div class='warn-msg'><b>WARNING:</b> " . sprintf(ERR_DBEMPTY, $_POST['dbname'], $tblcount) . "</div>"
|
93 |
+
: '';
|
94 |
+
}
|
95 |
+
|
96 |
+
//WARNNG: Input has utf8
|
97 |
+
$dbConnItems = array($_POST['dbhost'], $_POST['dbuser'], $_POST['dbname'],$_POST['dbpass']);
|
98 |
+
$dbUTF8_tst = false;
|
99 |
+
foreach ($dbConnItems as $value)
|
100 |
+
{
|
101 |
+
if (DUPX_U::isNonASCII($value)) {
|
102 |
+
$dbUTF8_tst = true;
|
103 |
+
break;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
//WARNING: UTF8 Data in Connection String
|
108 |
+
$html .= (! $dbConn && $dbUTF8_tst)
|
109 |
+
? "<div class='warn-msg'><b>WARNING:</b> " . ERR_TESTDB_UTF8 . "</div>"
|
110 |
+
: '';
|
111 |
+
|
112 |
+
//NOTICE: Version Too Low
|
113 |
+
$html .= ($dbversion_info_fail)
|
114 |
+
? "<div class='warn-msg'><b>NOTICE:</b> " . ERR_TESTDB_VERSION_INFO . "</div>"
|
115 |
+
: '';
|
116 |
+
|
117 |
+
//NOTICE: Version Incompatibility
|
118 |
+
$html .= ($dbversion_compat_fail)
|
119 |
+
? "<div class='warn-msg'><b>NOTICE:</b> " . ERR_TESTDB_VERSION_COMPAT . "</div>"
|
120 |
+
: '';
|
121 |
+
|
122 |
+
$html .= "</div>";
|
123 |
+
die($html);
|
124 |
+
}
|
125 |
+
|
126 |
+
//===============================
|
127 |
+
//ERROR MESSAGES
|
128 |
+
//===============================
|
129 |
+
//ERR_MAKELOG
|
130 |
+
($GLOBALS['LOG_FILE_HANDLE'] != false) or DUPX_Log::error(ERR_MAKELOG);
|
131 |
+
|
132 |
+
//ERR_MYSQLI_SUPPORT
|
133 |
+
function_exists('mysqli_connect') or DUPX_Log::error(ERR_MYSQLI_SUPPORT);
|
134 |
+
|
135 |
+
//ERR_DBCONNECT
|
136 |
+
$dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
|
137 |
+
@mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
|
138 |
+
($dbh) or DUPX_Log::error(ERR_DBCONNECT . mysqli_connect_error());
|
139 |
+
if ($_POST['dbaction'] == 'empty') {
|
140 |
+
mysqli_select_db($dbh, $_POST['dbname']) or DUPX_Log::error(sprintf(ERR_DBCREATE, $_POST['dbname']));
|
141 |
+
}
|
142 |
+
//ERR_DBEMPTY
|
143 |
+
if ($_POST['dbaction'] == 'create' ) {
|
144 |
+
$tblcount = DUPX_DB::countTables($dbh, $_POST['dbname']);
|
145 |
+
if ($tblcount > 0) {
|
146 |
+
DUPX_Log::error(sprintf(ERR_DBEMPTY, $_POST['dbname'], $tblcount));
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
$log = <<<LOG
|
151 |
+
\n\n********************************************************************************
|
152 |
+
* DUPLICATOR-LITE: INSTALL-LOG
|
153 |
+
* STEP-2 START @ {$date_time}
|
154 |
+
* NOTICE: Do NOT post to public sites or forums
|
155 |
+
********************************************************************************
|
156 |
+
LOG;
|
157 |
+
DUPX_Log::info($log);
|
158 |
+
|
159 |
+
$log = "--------------------------------------\n";
|
160 |
+
$log .= "POST DATA\n";
|
161 |
+
$log .= "--------------------------------------\n";
|
162 |
+
$log .= print_r($POST_LOG, true);
|
163 |
+
DUPX_Log::info($log, 2);
|
164 |
+
|
165 |
+
|
166 |
+
//====================================================================================================
|
167 |
+
//DATABASE ROUTINES
|
168 |
+
//====================================================================================================
|
169 |
+
$log = '';
|
170 |
+
$faq_url = $GLOBALS['FAQ_URL'];
|
171 |
+
$utm_prefix = '?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=';
|
172 |
+
$db_file_size = filesize('database.sql');
|
173 |
+
$php_mem = $GLOBALS['PHP_MEMORY_LIMIT'];
|
174 |
+
$php_mem_range = DUPX_U::getBytes($GLOBALS['PHP_MEMORY_LIMIT']);
|
175 |
+
$php_mem_range = $php_mem_range == null ? 0 : $php_mem_range - 5000000; //5 MB Buffer
|
176 |
+
|
177 |
+
//Fatal Memory errors from file_get_contents is not catchable.
|
178 |
+
//Try to warn ahead of time with a buffer in memory difference
|
179 |
+
if ($db_file_size >= $php_mem_range && $php_mem_range != 0)
|
180 |
+
{
|
181 |
+
$db_file_size = DUPX_U::readableByteSize($db_file_size);
|
182 |
+
$msg = "\nWARNING: The database script is '{$db_file_size}' in size. The PHP memory allocation is set\n";
|
183 |
+
$msg .= "at '{$php_mem}'. There is a high possibility that the installer script will fail with\n";
|
184 |
+
$msg .= "a memory allocation error when trying to load the database.sql file. It is\n";
|
185 |
+
$msg .= "recommended to increase the 'memory_limit' setting in the php.ini config file.\n";
|
186 |
+
$msg .= "see: {$faq_url}{$utm_prefix}inst_step2_lgdbscript#faq-trouble-056-q \n";
|
187 |
+
DUPX_Log::info($msg);
|
188 |
+
}
|
189 |
+
|
190 |
+
@chmod("{$root_path}/database.sql", 0777);
|
191 |
+
$sql_file = file_get_contents('database.sql', true);
|
192 |
+
|
193 |
+
//ERROR: Reading database.sql file
|
194 |
+
if ($sql_file === FALSE || strlen($sql_file) < 10)
|
195 |
+
{
|
196 |
+
$msg = "<b>Unable to read the database.sql file from the archive. Please check these items:</b> <br/>";
|
197 |
+
$msg .= "1. Validate permissions and/or group-owner rights on these items: <br/>";
|
198 |
+
$msg .= " - File: database.sql <br/> - Directory: [{$root_path}] <br/>";
|
199 |
+
$msg .= "<i>see: <a href='{$faq_url}{$utm_prefix}inst_step2_dbperms#faq-trouble-055-q' target='_blank'>{$faq_url}#faq-trouble-055-q</a></i> <br/>";
|
200 |
+
$msg .= "2. Validate the database.sql file exists and is in the root of the archive.zip file <br/>";
|
201 |
+
$msg .= "<i>see: <a href='{$faq_url}{$utm_prefix}inst_step2_sqlroot#faq-installer-020-q' target='_blank'>{$faq_url}#faq-installer-020-q</a></i> <br/>";
|
202 |
+
DUPX_Log::error($msg);
|
203 |
+
}
|
204 |
+
|
205 |
+
//Removes invalid space characters
|
206 |
+
//Complex Subject See: http://webcollab.sourceforge.net/unicode.html
|
207 |
+
if ($_POST['dbnbsp'])
|
208 |
+
{
|
209 |
+
DUPX_Log::info("NOTICE: Ran fix non-breaking space characters\n");
|
210 |
+
$sql_file = preg_replace('/\xC2\xA0/', ' ', $sql_file);
|
211 |
+
}
|
212 |
+
|
213 |
+
//Write new contents to install-data.sql
|
214 |
+
$sql_file_copy_status = file_put_contents($GLOBALS['SQL_FILE_NAME'], $sql_file);
|
215 |
+
$sql_result_file_data = explode(";\n", $sql_file);
|
216 |
+
$sql_result_file_length = count($sql_result_file_data);
|
217 |
+
$sql_result_file_path = "{$root_path}/{$GLOBALS['SQL_FILE_NAME']}";
|
218 |
+
$sql_file = null;
|
219 |
+
|
220 |
+
//WARNING: Create installer-data.sql failed
|
221 |
+
if ($sql_file_copy_status === FALSE || filesize($sql_result_file_path) == 0 || !is_readable($sql_result_file_path))
|
222 |
+
{
|
223 |
+
$sql_file_size = DUPX_U::readableByteSize(filesize('database.sql'));
|
224 |
+
$msg = "\nWARNING: Unable to properly copy database.sql ({$sql_file_size}) to {$GLOBALS['SQL_FILE_NAME']}. Please check these items:\n";
|
225 |
+
$msg .= "- Validate permissions and/or group-owner rights on database.sql and directory [{$root_path}] \n";
|
226 |
+
$msg .= "- see: {$faq_url}{$utm_prefix}inst_step2_copydbsql#faq-trouble-055-q \n";
|
227 |
+
DUPX_Log::info($msg);
|
228 |
+
}
|
229 |
+
|
230 |
+
//=================================
|
231 |
+
//START DB RUN
|
232 |
+
@mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
|
233 |
+
@mysqli_query($dbh, "SET max_allowed_packet = {$GLOBALS['DB_MAX_PACKETS']}");
|
234 |
+
DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
|
235 |
+
|
236 |
+
//Will set mode to null only for this db handle session
|
237 |
+
//sql_mode can cause db create issues on some systems
|
238 |
+
$qry_session_custom = true;
|
239 |
+
switch ($_POST['dbmysqlmode']) {
|
240 |
+
case 'DISABLE':
|
241 |
+
@mysqli_query($dbh, "SET SESSION sql_mode = ''");
|
242 |
+
break;
|
243 |
+
case 'CUSTOM':
|
244 |
+
$dbmysqlmode_opts = $_POST['dbmysqlmode_opts'];
|
245 |
+
$qry_session_custom = @mysqli_query($dbh, "SET SESSION sql_mode = '{$dbmysqlmode_opts}'");
|
246 |
+
if ($qry_session_custom == false)
|
247 |
+
{
|
248 |
+
$sql_error = mysqli_error($dbh);
|
249 |
+
$log = "WARNING: A custom sql_mode setting issue has been detected:\n{$sql_error}.\n";
|
250 |
+
$log .= "For more details visit: http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html\n";
|
251 |
+
}
|
252 |
+
break;
|
253 |
+
}
|
254 |
+
|
255 |
+
//Set defaults in-case the variable could not be read
|
256 |
+
$dbvar_maxtime = DUPX_DB::getVariable($dbh, 'wait_timeout');
|
257 |
+
$dbvar_maxpacks = DUPX_DB::getVariable($dbh, 'max_allowed_packet');
|
258 |
+
$dbvar_sqlmode = DUPX_DB::getVariable($dbh, 'sql_mode');
|
259 |
+
$dbvar_maxtime = is_null($dbvar_maxtime) ? 300 : $dbvar_maxtime;
|
260 |
+
$dbvar_maxpacks = is_null($dbvar_maxpacks) ? 1048576 : $dbvar_maxpacks;
|
261 |
+
$dbvar_sqlmode = empty($dbvar_sqlmode) ? 'NOT_SET' : $dbvar_sqlmode;
|
262 |
+
$dbvar_version = DUPX_DB::getVersion($dbh);
|
263 |
+
$sql_file_size1 = DUPX_U::readableByteSize(@filesize("database.sql"));
|
264 |
+
$sql_file_size2 = DUPX_U::readableByteSize(@filesize("{$GLOBALS['SQL_FILE_NAME']}"));
|
265 |
+
|
266 |
+
|
267 |
+
DUPX_Log::info("--------------------------------------");
|
268 |
+
DUPX_Log::info("DATABASE ENVIRONMENT");
|
269 |
+
DUPX_Log::info("--------------------------------------");
|
270 |
+
DUPX_Log::info("MYSQL VERSION:\tThis Server: {$dbvar_version} -- Build Server: {$GLOBALS['FW_VERSION_DB']}");
|
271 |
+
DUPX_Log::info("FILE SIZE:\tdatabase.sql ({$sql_file_size1}) - installer-data.sql ({$sql_file_size2})");
|
272 |
+
DUPX_Log::info("TIMEOUT:\t{$dbvar_maxtime}");
|
273 |
+
DUPX_Log::info("MAXPACK:\t{$dbvar_maxpacks}");
|
274 |
+
DUPX_Log::info("SQLMODE:\t{$dbvar_sqlmode}");
|
275 |
+
DUPX_Log::info("NEW SQL FILE:\t[{$sql_result_file_path}]");
|
276 |
+
|
277 |
+
if ($qry_session_custom == false)
|
278 |
+
{
|
279 |
+
DUPX_Log::info("\n{$log}\n");
|
280 |
+
}
|
281 |
+
|
282 |
+
//CREATE DB
|
283 |
+
switch ($_POST['dbaction']) {
|
284 |
+
case "create":
|
285 |
+
mysqli_query($dbh, "CREATE DATABASE IF NOT EXISTS `{$_POST['dbname']}`");
|
286 |
+
mysqli_select_db($dbh, $_POST['dbname'])
|
287 |
+
or DUPX_Log::error(sprintf(ERR_DBCONNECT_CREATE, $_POST['dbname']));
|
288 |
+
break;
|
289 |
+
case "empty":
|
290 |
+
//DROP DB TABLES
|
291 |
+
$drop_log = "Database already empty. Ready for install.";
|
292 |
+
$sql = "SHOW TABLES FROM `{$_POST['dbname']}`";
|
293 |
+
$found_tables = null;
|
294 |
+
if ($result = mysqli_query($dbh, $sql)) {
|
295 |
+
while ($row = mysqli_fetch_row($result)) {
|
296 |
+
$found_tables[] = $row[0];
|
297 |
+
}
|
298 |
+
if (count($found_tables) > 0) {
|
299 |
+
foreach ($found_tables as $table_name) {
|
300 |
+
$sql = "DROP TABLE `{$_POST['dbname']}`.`{$table_name}`";
|
301 |
+
if (!$result = mysqli_query($dbh, $sql)) {
|
302 |
+
DUPX_Log::error(sprintf(ERR_DBTRYCLEAN, $_POST['dbname']));
|
303 |
+
}
|
304 |
+
}
|
305 |
+
}
|
306 |
+
$drop_log = count($found_tables);
|
307 |
+
}
|
308 |
+
break;
|
309 |
+
}
|
310 |
+
|
311 |
+
|
312 |
+
//WRITE DATA
|
313 |
+
DUPX_Log::info("--------------------------------------");
|
314 |
+
DUPX_Log::info("DATABASE RESULTS");
|
315 |
+
DUPX_Log::info("--------------------------------------");
|
316 |
+
$profile_start = DUPX_U::getMicrotime();
|
317 |
+
$fcgi_buffer_pool = 5000;
|
318 |
+
$fcgi_buffer_count = 0;
|
319 |
+
$dbquery_rows = 0;
|
320 |
+
$dbtable_rows = 1;
|
321 |
+
$dbquery_errs = 0;
|
322 |
+
$counter = 0;
|
323 |
+
@mysqli_autocommit($dbh, false);
|
324 |
+
|
325 |
+
while ($counter < $sql_result_file_length) {
|
326 |
+
|
327 |
+
$query_strlen = strlen(trim($sql_result_file_data[$counter]));
|
328 |
+
|
329 |
+
if ($dbvar_maxpacks < $query_strlen) {
|
330 |
+
|
331 |
+
DUPX_Log::info("**ERROR** Query size limit [length={$query_strlen}] [sql=" . substr($sql_result_file_data[$counter], 75) . "...]");
|
332 |
+
$dbquery_errs++;
|
333 |
+
|
334 |
+
} elseif ($query_strlen > 0) {
|
335 |
+
|
336 |
+
@mysqli_free_result(@mysqli_query($dbh, ($sql_result_file_data[$counter])));
|
337 |
+
$err = mysqli_error($dbh);
|
338 |
+
|
339 |
+
//Check to make sure the connection is alive
|
340 |
+
if (!empty($err)) {
|
341 |
+
|
342 |
+
if (!mysqli_ping($dbh)) {
|
343 |
+
mysqli_close($dbh);
|
344 |
+
$dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport'] );
|
345 |
+
// Reset session setup
|
346 |
+
@mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
|
347 |
+
DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
|
348 |
+
}
|
349 |
+
DUPX_Log::info("**ERROR** database error write '{$err}' - [sql=" . substr($sql_result_file_data[$counter], 0, 75) . "...]");
|
350 |
+
$dbquery_errs++;
|
351 |
+
|
352 |
+
//Buffer data to browser to keep connection open
|
353 |
+
} else {
|
354 |
+
if ($GLOBALS['DB_FCGI_FLUSH'] && $fcgi_buffer_count++ > $fcgi_buffer_pool) {
|
355 |
+
$fcgi_buffer_count = 0;
|
356 |
+
DUPX_U::fcgiFlush();
|
357 |
+
}
|
358 |
+
$dbquery_rows++;
|
359 |
+
}
|
360 |
+
}
|
361 |
+
$counter++;
|
362 |
+
}
|
363 |
+
@mysqli_commit($dbh);
|
364 |
+
@mysqli_autocommit($dbh, true);
|
365 |
+
|
366 |
+
DUPX_Log::info("ERRORS FOUND:\t{$dbquery_errs}");
|
367 |
+
DUPX_Log::info("TABLES DROPPED:\t{$drop_log}");
|
368 |
+
DUPX_Log::info("QUERIES RAN:\t{$dbquery_rows}\n");
|
369 |
+
|
370 |
+
$dbtable_count = 0;
|
371 |
+
if ($result = mysqli_query($dbh, "SHOW TABLES")) {
|
372 |
+
while ($row = mysqli_fetch_array($result, MYSQLI_NUM)) {
|
373 |
+
$table_rows = DUPX_DB::countTableRows($dbh, $row[0]);
|
374 |
+
$dbtable_rows += $table_rows;
|
375 |
+
DUPX_Log::info("{$row[0]}: ({$table_rows})");
|
376 |
+
$dbtable_count++;
|
377 |
+
}
|
378 |
+
@mysqli_free_result($result);
|
379 |
+
}
|
380 |
+
|
381 |
+
if ($dbtable_count == 0) {
|
382 |
+
DUPX_Log::error("No tables where created during step 2 of the install. Please review the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for
|
383 |
+
ERROR messages. You may have to manually run the installer-data.sql with a tool like phpmyadmin to validate the data input. If you have enabled compatibility mode
|
384 |
+
during the package creation process then the database server version your using may not be compatible with this script.\n");
|
385 |
+
}
|
386 |
+
|
387 |
+
|
388 |
+
//DATA CLEANUP: Perform Transient Cache Cleanup
|
389 |
+
//Remove all duplicator entries and record this one since this is a new install.
|
390 |
+
$dbdelete_count = 0;
|
391 |
+
@mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}duplicator_packages`");
|
392 |
+
$dbdelete_count1 = @mysqli_affected_rows($dbh) or 0;
|
393 |
+
@mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` LIKE ('_transient%') OR `option_name` LIKE ('_site_transient%')");
|
394 |
+
$dbdelete_count2 = @mysqli_affected_rows($dbh) or 0;
|
395 |
+
$dbdelete_count = (abs($dbdelete_count1) + abs($dbdelete_count2));
|
396 |
+
DUPX_Log::info("\nRemoved '{$dbdelete_count}' cache/transient rows");
|
397 |
+
//Reset Duplicator Options
|
398 |
+
foreach ($GLOBALS['FW_OPTS_DELETE'] as $value) {
|
399 |
+
mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` = '{$value}'");
|
400 |
+
}
|
401 |
+
|
402 |
+
@mysqli_close($dbh);
|
403 |
+
|
404 |
+
//FINAL RESULTS
|
405 |
+
$profile_end = DUPX_U::getMicrotime();
|
406 |
+
$ajax2_end = DUPX_U::getMicrotime();
|
407 |
+
$ajax1_sum = DUPX_U::elapsedTime($ajax2_end, $ajax2_start);
|
408 |
+
DUPX_Log::info("\nCREATE/INSTALL RUNTIME: " . DUPX_U::elapsedTime($profile_end, $profile_start));
|
409 |
+
DUPX_Log::info('STEP-2 COMPLETE @ ' . @date('h:i:s') . " - RUNTIME: {$ajax1_sum}");
|
410 |
+
|
411 |
+
$JSON['pass'] = 1;
|
412 |
+
$JSON['table_count'] = $dbtable_count;
|
413 |
+
$JSON['table_rows'] = $dbtable_rows;
|
414 |
+
$JSON['query_errs'] = $dbquery_errs;
|
415 |
+
echo json_encode($JSON);
|
416 |
+
error_reporting($ajax1_error_level);
|
417 |
+
die('');
|
418 |
?>
|
installer/build/main.installer.php
CHANGED
@@ -85,6 +85,7 @@ $GLOBALS['FW_TABLEPREFIX'] = '%fwrite_wp_tableprefix%';
|
|
85 |
$GLOBALS['FW_URL_OLD'] = '%fwrite_url_old%';
|
86 |
$GLOBALS['FW_PACKAGE_NAME'] = '%fwrite_archive_name%';
|
87 |
$GLOBALS['FW_PACKAGE_NOTES'] = '%fwrite_package_notes%';
|
|
|
88 |
$GLOBALS['FW_SECURE_NAME'] = '%fwrite_secure_name%';
|
89 |
$GLOBALS['FW_DBHOST'] = '%fwrite_dbhost%';
|
90 |
$GLOBALS['FW_DBHOST'] = empty($GLOBALS['FW_DBHOST']) ? 'localhost' : $GLOBALS['FW_DBHOST'];
|
@@ -297,15 +298,15 @@ switch ($_POST['action_step']) {
|
|
297 |
</div>
|
298 |
|
299 |
<script>
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
</script>
|
310 |
|
311 |
</body>
|
85 |
$GLOBALS['FW_URL_OLD'] = '%fwrite_url_old%';
|
86 |
$GLOBALS['FW_PACKAGE_NAME'] = '%fwrite_archive_name%';
|
87 |
$GLOBALS['FW_PACKAGE_NOTES'] = '%fwrite_package_notes%';
|
88 |
+
$GLOBALS['FW_PACKAGE_EST_SIZE'] = '%fwrite_package_size%';
|
89 |
$GLOBALS['FW_SECURE_NAME'] = '%fwrite_secure_name%';
|
90 |
$GLOBALS['FW_DBHOST'] = '%fwrite_dbhost%';
|
91 |
$GLOBALS['FW_DBHOST'] = empty($GLOBALS['FW_DBHOST']) ? 'localhost' : $GLOBALS['FW_DBHOST'];
|
298 |
</div>
|
299 |
|
300 |
<script>
|
301 |
+
/* Server Info Dialog*/
|
302 |
+
DUPX.showServerInfo = function()
|
303 |
+
{
|
304 |
+
modal({
|
305 |
+
type: 'alert',
|
306 |
+
title: 'Server Information',
|
307 |
+
text: $('#dialog-server-info').html()
|
308 |
+
});
|
309 |
+
}
|
310 |
</script>
|
311 |
|
312 |
</body>
|
installer/build/view.help.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
HELP FORM -->
|
3 |
<div id="main-help">
|
4 |
<div class="help-online">
|
5 |
-
<i class="fa fa-file-text-o"></i> For additional help visit the<br/> <a href="https://snapcreek.com/support/docs
|
6 |
<small>Features available only in Duplicator Pro are flagged with a <sup>pro</sup> tag.</small>
|
7 |
</div>
|
8 |
|
@@ -91,7 +91,7 @@ STEP 1
|
|
91 |
<tr>
|
92 |
<td>Config Files</td>
|
93 |
<td>
|
94 |
-
Inside the archive.zip should be a copy of the original .htaccess (Apache) or the web.config (IIS) files that were
|
95 |
When the installer runs it will backup and then reset all <i>.htaccess, user.ini, and web.config</i> files. It will then create blank copies of
|
96 |
both files. This is needed because the original files that were archived in most cases will not play well in the new environment.
|
97 |
<br/><br/>
|
@@ -135,7 +135,7 @@ STEP 2
|
|
135 |
|
136 |
<h3>Basic/cPanel:</h3>
|
137 |
There are currently two options you can use to perform the database setup. The "Basic" option requires knowledge about the existing server and on most hosts
|
138 |
-
will require that the database be
|
139 |
This option will automatically show you the existing databases and users on your cPanel server and allow you to create new databases directly
|
140 |
from the installer.
|
141 |
<br/><br/>
|
@@ -170,7 +170,7 @@ STEP 2
|
|
170 |
- Your host does not use <a href="http://cpanel.com/" target="_blank">cPanel Software</a> <br/>
|
171 |
- Your host has disabled cPanel API access <br/>
|
172 |
- Your host has configured cPanel to work differently (please contact your host) <br/>
|
173 |
-
- View a list of valid cPanel <a href='https://snapcreek.com/wordpress-hosting
|
174 |
</td>
|
175 |
</tr>
|
176 |
</table>
|
@@ -243,7 +243,7 @@ STEP 2
|
|
243 |
<td>Prefix:<sup>pro*</sup></td>
|
244 |
<td>By default, databases are prefixed with the cPanel account's username (for example, myusername_databasename). However you can ignore this option if
|
245 |
your host does not use the default cPanel username prefix schema. Check the 'Ignore cPanel Prefix' and the username prefixes will be ignored.
|
246 |
-
This will still require you to enter in the
|
247 |
disabled prefix settings. Please see your host full requirements when using the cPanel options.</td>
|
248 |
</tr>
|
249 |
<tr>
|
@@ -426,7 +426,7 @@ STEP 4
|
|
426 |
<div style="padding: 0px 10px 10px 10px;">
|
427 |
<b>Common Quick Fix Issues:</b>
|
428 |
<ul>
|
429 |
-
<li>Use an <a href='https://snapcreek.com/wordpress-hosting
|
430 |
<li>Validate directory and file permissions (see below)</li>
|
431 |
<li>Validate web server configuration file (see below)</li>
|
432 |
<li>Clear your browsers cache</li>
|
@@ -461,7 +461,7 @@ STEP 4
|
|
461 |
|
462 |
</div>
|
463 |
|
464 |
-
<div style="text-align:center">For additional help please visit the <a href="https://snapcreek.com/support/docs
|
465 |
|
466 |
<br/><br/>
|
467 |
</div>
|
2 |
HELP FORM -->
|
3 |
<div id="main-help">
|
4 |
<div class="help-online">
|
5 |
+
<i class="fa fa-file-text-o"></i> For additional help visit the<br/> <a href="https://snapcreek.com/support/docs/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=knowledgebase" target="_blank">Online Knowledge-Base</a><br/>
|
6 |
<small>Features available only in Duplicator Pro are flagged with a <sup>pro</sup> tag.</small>
|
7 |
</div>
|
8 |
|
91 |
<tr>
|
92 |
<td>Config Files</td>
|
93 |
<td>
|
94 |
+
Inside the archive.zip should be a copy of the original .htaccess (Apache) or the web.config (IIS) files that were set up with your packaged site.
|
95 |
When the installer runs it will backup and then reset all <i>.htaccess, user.ini, and web.config</i> files. It will then create blank copies of
|
96 |
both files. This is needed because the original files that were archived in most cases will not play well in the new environment.
|
97 |
<br/><br/>
|
135 |
|
136 |
<h3>Basic/cPanel:</h3>
|
137 |
There are currently two options you can use to perform the database setup. The "Basic" option requires knowledge about the existing server and on most hosts
|
138 |
+
will require that the database be set up ahead of time. The cPanel option is for hosts that support <a href="http://cpanel.com/" target="_blank">cPanel Software</a>.
|
139 |
This option will automatically show you the existing databases and users on your cPanel server and allow you to create new databases directly
|
140 |
from the installer.
|
141 |
<br/><br/>
|
170 |
- Your host does not use <a href="http://cpanel.com/" target="_blank">cPanel Software</a> <br/>
|
171 |
- Your host has disabled cPanel API access <br/>
|
172 |
- Your host has configured cPanel to work differently (please contact your host) <br/>
|
173 |
+
- View a list of valid cPanel <a href='https://snapcreek.com/wordpress-hosting/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=affiliate&utm_content=inst_cpanel_hosts' target='_blank'>Supported Hosts</a>
|
174 |
</td>
|
175 |
</tr>
|
176 |
</table>
|
243 |
<td>Prefix:<sup>pro*</sup></td>
|
244 |
<td>By default, databases are prefixed with the cPanel account's username (for example, myusername_databasename). However you can ignore this option if
|
245 |
your host does not use the default cPanel username prefix schema. Check the 'Ignore cPanel Prefix' and the username prefixes will be ignored.
|
246 |
+
This will still require you to enter in the cPanel's required setup prefix if they require one. The checkbox will be set to read-only if your host has
|
247 |
disabled prefix settings. Please see your host full requirements when using the cPanel options.</td>
|
248 |
</tr>
|
249 |
<tr>
|
426 |
<div style="padding: 0px 10px 10px 10px;">
|
427 |
<b>Common Quick Fix Issues:</b>
|
428 |
<ul>
|
429 |
+
<li>Use an <a href='https://snapcreek.com/wordpress-hosting/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=affiliate&utm_content=inst_help_hosts' target='_blank'>approved hosting provider</a></li>
|
430 |
<li>Validate directory and file permissions (see below)</li>
|
431 |
<li>Validate web server configuration file (see below)</li>
|
432 |
<li>Clear your browsers cache</li>
|
461 |
|
462 |
</div>
|
463 |
|
464 |
+
<div style="text-align:center">For additional help please visit the <a href="https://snapcreek.com/support/docs/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=additional_help" target="_blank">online resources</a></div>
|
465 |
|
466 |
<br/><br/>
|
467 |
</div>
|
installer/build/view.step1.php
CHANGED
@@ -8,6 +8,9 @@ $arcSize = @filesize($GLOBALS['ARCHIVE_PATH']);
|
|
8 |
$arcSize = is_numeric($arcSize) ? $arcSize : 0;
|
9 |
$zip_archive_enabled = class_exists('ZipArchive') ? 'Enabled' : 'Not Enabled';
|
10 |
|
|
|
|
|
|
|
11 |
//ARCHIVE FORMAT
|
12 |
if ($arcStatus) {
|
13 |
if (class_exists('ZipArchive')){
|
@@ -41,13 +44,13 @@ if ($arcStatus) {
|
|
41 |
}
|
42 |
}
|
43 |
|
44 |
-
$all_arc = ($arcStatus == 'Pass' && $arcFormat != 'Fail') ? 'Pass' : 'Fail';
|
45 |
|
46 |
//REQUIRMENTS
|
47 |
$req = array();
|
48 |
$req['01'] = DUPX_Server::isDirWritable($GLOBALS["CURRENT_ROOT_PATH"]) ? 'Pass' : 'Fail';
|
49 |
$req['02'] = 'Pass'; //Place-holder for future check
|
50 |
-
$req['03'] =
|
51 |
$req['04'] = function_exists('mysqli_connect') ? 'Pass' : 'Fail';
|
52 |
$req['05'] = DUPX_Server::$php_version_safe ? 'Pass' : 'Fail';
|
53 |
$all_req = in_array('Fail', $req) ? 'Fail' : 'Pass';
|
@@ -72,9 +75,9 @@ if (!$GLOBALS['FW_ARCHIVE_ONLYDB']) {
|
|
72 |
$notice['01'] = ! file_exists($wpconf_path) ? 'Good' : 'Warn';
|
73 |
$notice['02'] = $scancount <= 35 ? 'Good' : 'Warn';
|
74 |
}
|
75 |
-
$notice['03'] = $fulldays <=
|
76 |
$notice['04'] = 'Good'; //Place-holder for future check
|
77 |
-
$notice['05'] = 'Good'
|
78 |
$notice['06'] = empty($openbase) ? 'Good' : 'Warn';
|
79 |
$notice['07'] = ! $max_time_warn ? 'Good' : 'Warn';
|
80 |
$all_notice = in_array('Warn', $notice) ? 'Warn' : 'Good';
|
@@ -133,9 +136,22 @@ ARCHIVE
|
|
133 |
<tr>
|
134 |
<td colspan="2"><div class="hdr-sub3">File Details</div></td>
|
135 |
</tr>
|
136 |
-
<tr>
|
137 |
<td>Size:</td>
|
138 |
-
<td
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
</tr>
|
140 |
<tr>
|
141 |
<td>Name:</td>
|
@@ -204,7 +220,7 @@ ARCHIVE
|
|
204 |
<br/><br/>
|
205 |
|
206 |
Files such as database.sql and wp-config.php should be at the root of the archive. For more details see the FAQ article
|
207 |
-
<a href="https://snapcreek.com/duplicator/docs/faqs-tech
|
208 |
</div>
|
209 |
<?php endif; ?>
|
210 |
</td>
|
@@ -240,7 +256,7 @@ VALIDATION
|
|
240 |
|
241 |
<!-- REQ 1 -->
|
242 |
<div class="status <?php echo strtolower($req['01']); ?>"><?php echo $req['01']; ?></div>
|
243 |
-
<div class="title" data-type="toggle" data-target="#s1-reqs01">+
|
244 |
<div class="info" id="s1-reqs01">
|
245 |
<table>
|
246 |
<tr>
|
@@ -249,13 +265,19 @@ VALIDATION
|
|
249 |
</tr>
|
250 |
<tr>
|
251 |
<td><b>Suhosin Extension:</b> </td>
|
252 |
-
<td><?php echo extension_loaded('suhosin') ? "<i class='dupx-fail'>Enabled</i>
|
|
|
|
|
|
|
|
|
253 |
</tr>
|
254 |
</table><br/>
|
255 |
|
256 |
-
The deployment path must be writable by PHP in order to extract the archive file. Incorrect permissions and extension such as
|
257 |
<a href="https://suhosin.org/stories/index.html" target="_blank">suhosin</a> can sometimes inter-fear with PHP being able to write/extract files.
|
258 |
-
Please see the <a href="https://snapcreek.com/duplicator/docs/faqs-tech
|
|
|
|
|
259 |
</div>
|
260 |
|
261 |
<!-- REQ 2
|
@@ -263,17 +285,14 @@ VALIDATION
|
|
263 |
<div class="title" data-type="toggle" data-target="#s1-reqs02">+ Place Holder</div>
|
264 |
<div class="info" id="s1-reqs02"></div>-->
|
265 |
|
266 |
-
<!-- REQ 3
|
267 |
<div class="status <?php echo strtolower($req['03']); ?>"><?php echo $req['03']; ?></div>
|
268 |
-
<div class="title" data-type="toggle" data-target="#s1-reqs03">+
|
269 |
-
<div class="info" id="s1-reqs03">
|
270 |
-
PHP with <a href='http://php.net/manual/en/features.safe-mode.php' target='_blank'>safe mode</a> must be disabled. If this test fails
|
271 |
-
please contact your hosting provider or server administrator to disable PHP safe mode.
|
272 |
-
</div>
|
273 |
|
274 |
<!-- REQ 4 -->
|
275 |
<div class="status <?php echo strtolower($req['04']); ?>"><?php echo $req['04']; ?></div>
|
276 |
-
<div class="title" data-type="toggle" data-target="#s1-reqs04">+ PHP
|
277 |
<div class="info" id="s1-reqs04">
|
278 |
Support for the PHP <a href='http://us2.php.net/manual/en/mysqli.installation.php' target='_blank'>mysqli extension</a> is required.
|
279 |
Please contact your hosting provider or server administrator to enable the mysqli extension. <i>The detection for this call uses
|
@@ -282,7 +301,7 @@ VALIDATION
|
|
282 |
|
283 |
<!-- REQ 5 -->
|
284 |
<div class="status <?php echo strtolower($req['05']); ?>"><?php echo $req['05']; ?></div>
|
285 |
-
<div class="title" data-type="toggle" data-target="#s1-reqs05">+ PHP Version</div>
|
286 |
<div class="info" id="s1-reqs05">
|
287 |
This server is running PHP: <b><?php echo DUPX_Server::$php_version ?></b>. <i>A minimum of PHP 5.2.17 is required</i>.
|
288 |
Contact your hosting provider or server administrator and let them know you would like to upgrade your PHP version.
|
@@ -342,7 +361,8 @@ VALIDATION
|
|
342 |
<div class="status <?php echo ($notice['03'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['03']; ?></div>
|
343 |
<div class="title" data-type="toggle" data-target="#s1-notice03">+ Package Age</div>
|
344 |
<div class="info" id="s1-notice03">
|
345 |
-
<?php echo "The package is {$fulldays} day(s) old. Packages older than
|
|
|
346 |
</div>
|
347 |
|
348 |
<!-- NOTICE 4
|
@@ -351,17 +371,23 @@ VALIDATION
|
|
351 |
<div class="info" id="s1-notice04">
|
352 |
</div>-->
|
353 |
|
354 |
-
|
355 |
-
<!-- NOTICE 5
|
356 |
<div class="status <?php echo ($notice['05'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['05']; ?></div>
|
357 |
-
<div class="title" data-type="toggle" data-target="#s1-notice05">+
|
358 |
<div class="info" id="s1-notice05">
|
359 |
<?php
|
360 |
-
$
|
361 |
-
|
362 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
?>
|
364 |
-
</div
|
365 |
|
366 |
<!-- NOTICE 6 -->
|
367 |
<div class="status <?php echo ($notice['06'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['06']; ?></div>
|
@@ -370,7 +396,7 @@ VALIDATION
|
|
370 |
<b>Open BaseDir:</b> <i><?php echo $notice['06'] == 'Good' ? "<i class='dupx-pass'>Disabled</i>" : "<i class='dupx-fail'>Enabled</i>"; ?></i>
|
371 |
<br/><br/>
|
372 |
|
373 |
-
If <a href="http://www.php.net/manual/en/ini.core.php#ini.open-basedir" target="_blank">open_basedir</a> is enabled and
|
374 |
having issues getting your site to install properly; please work with your host and follow these steps to prevent issues:
|
375 |
<ol style="margin:7px; line-height:19px">
|
376 |
<li>Disable the open_basedir setting in the php.ini file</li>
|
@@ -388,7 +414,7 @@ VALIDATION
|
|
388 |
<div class="title" data-type="toggle" data-target="#s1-notice07">+ PHP Timeout</div>
|
389 |
<div class="info" id="s1-notice07">
|
390 |
<b>Archive Size:</b> <?php echo DUPX_U::readableByteSize($arcSize) ?> <small>(detection limit is set at <?php echo DUPX_U::readableByteSize($max_time_size) ?>) </small><br/>
|
391 |
-
<b>PHP max_execution_time:</b> <?php echo "{$max_time_ini}"; ?> <small>(zero means
|
392 |
<b>PHP set_time_limit:</b> <?php echo ($max_time_zero) ? '<i style="color:green">Success</i>' : '<i style="color:maroon">Failed</i>' ?>
|
393 |
<br/><br/>
|
394 |
|
@@ -401,7 +427,7 @@ VALIDATION
|
|
401 |
<a href="http://php.net/manual/en/function.set-time-limit.php" target="_blank">set_time_limit</a> setting. If this notice shows as a warning then it is
|
402 |
still safe to continue with the install. However, if a timeout occurs then you will need to consider working with the max_execution_time setting or extracting the
|
403 |
archive file using the 'Manual package extraction' method.
|
404 |
-
Please see the <a href="https://snapcreek.com/duplicator/docs/faqs-tech
|
405 |
|
406 |
</div>
|
407 |
</div>
|
@@ -470,12 +496,12 @@ OPTIONS
|
|
470 |
<table style='width:100%'>
|
471 |
<tr>
|
472 |
<td style="width:200px">
|
473 |
-
» Watch the <a href="https://snapcreek.com/duplicator/docs/faqs-tech
|
474 |
-
» Read helpful <a href="https://snapcreek.com/duplicator/docs/faqs-tech
|
475 |
</td>
|
476 |
<td>
|
477 |
-
» Visit the <a href="https://snapcreek.com/duplicator/docs/quick-start
|
478 |
-
» Browse the <a href="https://snapcreek.com/duplicator/docs
|
479 |
</td>
|
480 |
</tr>
|
481 |
</table>
|
@@ -488,71 +514,66 @@ OPTIONS
|
|
488 |
<!-- ====================================
|
489 |
NOTICES
|
490 |
==================================== -->
|
491 |
-
<div
|
492 |
-
<
|
493 |
-
</
|
494 |
-
|
495 |
-
<
|
496 |
-
|
497 |
-
<
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
<
|
520 |
-
<
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO
|
546 |
-
OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
547 |
-
<br/><br/>
|
548 |
-
|
549 |
-
</div>
|
550 |
</div>
|
551 |
</div>
|
552 |
|
553 |
<div id="s1-warning-check">
|
554 |
<input id="accept-warnings" name="accpet-warnings" type="checkbox" onclick="DUPX.acceptWarning()" />
|
555 |
-
<label for="accept-warnings">I have read and accept all terms & notices <small style="font-style:italic">(required to continue)</small></label><br/>
|
556 |
</div>
|
557 |
|
558 |
|
@@ -563,8 +584,8 @@ NOTICES
|
|
563 |
server administrator, hosting provider or visit the resources below for additional help.
|
564 |
</i>
|
565 |
<div style="padding:10px">
|
566 |
-
» <a href="https://snapcreek.com/duplicator/docs/faqs-tech
|
567 |
-
» <a href="https://snapcreek.com/support/docs
|
568 |
</div>
|
569 |
</div> <br/><br/>
|
570 |
<?php else : ?>
|
@@ -614,10 +635,10 @@ Auto Posts to view.step2.php
|
|
614 |
<div id="ajaxerr-area" style="display:none">
|
615 |
<p>Please try again an issue has occurred.</p>
|
616 |
<div style="padding: 0px 10px 10px 0px;">
|
617 |
-
<div id="ajaxerr-data">An unknown issue has occurred with the file and database
|
618 |
<div style="text-align:center; margin:10px auto 0px auto">
|
619 |
<input type="button" class="default-btn" onclick="DUPX.hideErrorResult()" value="« Try Again" /><br/><br/>
|
620 |
-
<i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket' target='_blank'>snapcreek.com</a></i>
|
621 |
</div>
|
622 |
</div>
|
623 |
</div>
|
@@ -675,7 +696,7 @@ Auto Posts to view.step2.php
|
|
675 |
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
676 |
status += "- Check the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for warnings or errors.<br/>";
|
677 |
status += "- Check the web server and PHP error logs. <br/>";
|
678 |
-
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech
|
679 |
$('#ajaxerr-data').html(status);
|
680 |
DUPX.hideProgressBar();
|
681 |
}
|
@@ -695,6 +716,17 @@ Auto Posts to view.step2.php
|
|
695 |
}
|
696 |
}
|
697 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
698 |
/** Go back on AJAX result view */
|
699 |
DUPX.hideErrorResult = function()
|
700 |
{
|
8 |
$arcSize = is_numeric($arcSize) ? $arcSize : 0;
|
9 |
$zip_archive_enabled = class_exists('ZipArchive') ? 'Enabled' : 'Not Enabled';
|
10 |
|
11 |
+
$arcSizeRatio = (((1.0) * $arcSize) / $GLOBALS['FW_PACKAGE_EST_SIZE']) * 100;
|
12 |
+
$arcSizeStatus = ($arcSizeRatio > 90) ? 'Pass' : 'Fail';
|
13 |
+
|
14 |
//ARCHIVE FORMAT
|
15 |
if ($arcStatus) {
|
16 |
if (class_exists('ZipArchive')){
|
44 |
}
|
45 |
}
|
46 |
|
47 |
+
$all_arc = ($arcStatus == 'Pass' && $arcFormat != 'Fail' && $arcSizeStatus == 'Pass') ? 'Pass' : 'Fail';
|
48 |
|
49 |
//REQUIRMENTS
|
50 |
$req = array();
|
51 |
$req['01'] = DUPX_Server::isDirWritable($GLOBALS["CURRENT_ROOT_PATH"]) ? 'Pass' : 'Fail';
|
52 |
$req['02'] = 'Pass'; //Place-holder for future check
|
53 |
+
$req['03'] = 'Pass'; //Place-holder for future check;
|
54 |
$req['04'] = function_exists('mysqli_connect') ? 'Pass' : 'Fail';
|
55 |
$req['05'] = DUPX_Server::$php_version_safe ? 'Pass' : 'Fail';
|
56 |
$all_req = in_array('Fail', $req) ? 'Fail' : 'Pass';
|
75 |
$notice['01'] = ! file_exists($wpconf_path) ? 'Good' : 'Warn';
|
76 |
$notice['02'] = $scancount <= 35 ? 'Good' : 'Warn';
|
77 |
}
|
78 |
+
$notice['03'] = $fulldays <= 120 ? 'Good' : 'Warn';
|
79 |
$notice['04'] = 'Good'; //Place-holder for future check
|
80 |
+
$notice['05'] = DUPX_Server::$php_version_53_plus ? 'Good' : 'Warn';
|
81 |
$notice['06'] = empty($openbase) ? 'Good' : 'Warn';
|
82 |
$notice['07'] = ! $max_time_warn ? 'Good' : 'Warn';
|
83 |
$all_notice = in_array('Warn', $notice) ? 'Warn' : 'Good';
|
136 |
<tr>
|
137 |
<td colspan="2"><div class="hdr-sub3">File Details</div></td>
|
138 |
</tr>
|
139 |
+
<tr style="vertical-align:top">
|
140 |
<td>Size:</td>
|
141 |
+
<td>
|
142 |
+
<?php
|
143 |
+
$projectedSize = DUPX_U::readableByteSize($GLOBALS['FW_PACKAGE_EST_SIZE']);
|
144 |
+
$actualSize = DUPX_U::readableByteSize($arcSize);
|
145 |
+
echo "{$actualSize}<br/>";
|
146 |
+
if ($arcSizeStatus == 'Fail' ) {
|
147 |
+
echo "<span class='dupx-fail'>The archive file size is currently <b>{$actualSize}</b> and its estimated file size should be around <b>{$projectedSize}</b>. "
|
148 |
+
. "The archive file may not have been fully downloaded to the server. If so please wait for the file to completely download and then refresh this page.<br/><br/>";
|
149 |
+
|
150 |
+
echo "This warning is only shown when the file has more than a 10% size ratio difference from when it was originally built. Please review the file sizes "
|
151 |
+
. "to make sure the archive was downloaded to this server correctly if the download is complete.</span>";
|
152 |
+
}
|
153 |
+
?>
|
154 |
+
</td>
|
155 |
</tr>
|
156 |
<tr>
|
157 |
<td>Name:</td>
|
220 |
<br/><br/>
|
221 |
|
222 |
Files such as database.sql and wp-config.php should be at the root of the archive. For more details see the FAQ article
|
223 |
+
<a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=invalid_ar_fmt#faq-installer-020-q" target="_help">The archive format is changing on my Mac what might be the problem?</a>
|
224 |
</div>
|
225 |
<?php endif; ?>
|
226 |
</td>
|
256 |
|
257 |
<!-- REQ 1 -->
|
258 |
<div class="status <?php echo strtolower($req['01']); ?>"><?php echo $req['01']; ?></div>
|
259 |
+
<div class="title" data-type="toggle" data-target="#s1-reqs01">+ Permissions</div>
|
260 |
<div class="info" id="s1-reqs01">
|
261 |
<table>
|
262 |
<tr>
|
265 |
</tr>
|
266 |
<tr>
|
267 |
<td><b>Suhosin Extension:</b> </td>
|
268 |
+
<td><?php echo extension_loaded('suhosin') ? "<i class='dupx-fail'>Enabled</i>" : "<i class='dupx-pass'>Disabled</i>"; ?> </td>
|
269 |
+
</tr>
|
270 |
+
<tr>
|
271 |
+
<td><b>PHP Safe Mode:</b> </td>
|
272 |
+
<td><?php echo (DUPX_Server::$php_safe_mode_on) ? "<i class='dupx-fail'>Enabled</i>" : "<i class='dupx-pass'>Disabled</i>"; ?> </td>
|
273 |
</tr>
|
274 |
</table><br/>
|
275 |
|
276 |
+
The deployment path above must be writable by PHP in order to extract the archive file. Incorrect permissions and extension such as
|
277 |
<a href="https://suhosin.org/stories/index.html" target="_blank">suhosin</a> can sometimes inter-fear with PHP being able to write/extract files.
|
278 |
+
Please see the <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=installer_perms#faq-trouble-055-q" target="_blank">FAQ permission</a> help link for complete details.
|
279 |
+
PHP with <a href='http://php.net/manual/en/features.safe-mode.php' target='_blank'>safe mode</a> should be disabled. If this test fails
|
280 |
+
please contact your hosting provider or server administrator to disable PHP safe mode.
|
281 |
</div>
|
282 |
|
283 |
<!-- REQ 2
|
285 |
<div class="title" data-type="toggle" data-target="#s1-reqs02">+ Place Holder</div>
|
286 |
<div class="info" id="s1-reqs02"></div>-->
|
287 |
|
288 |
+
<!-- REQ 3
|
289 |
<div class="status <?php echo strtolower($req['03']); ?>"><?php echo $req['03']; ?></div>
|
290 |
+
<div class="title" data-type="toggle" data-target="#s1-reqs03">+ Place Holder</div>
|
291 |
+
<div class="info" id="s1-reqs03"></div> -->
|
|
|
|
|
|
|
292 |
|
293 |
<!-- REQ 4 -->
|
294 |
<div class="status <?php echo strtolower($req['04']); ?>"><?php echo $req['04']; ?></div>
|
295 |
+
<div class="title" data-type="toggle" data-target="#s1-reqs04">+ PHP Mysqli</div>
|
296 |
<div class="info" id="s1-reqs04">
|
297 |
Support for the PHP <a href='http://us2.php.net/manual/en/mysqli.installation.php' target='_blank'>mysqli extension</a> is required.
|
298 |
Please contact your hosting provider or server administrator to enable the mysqli extension. <i>The detection for this call uses
|
301 |
|
302 |
<!-- REQ 5 -->
|
303 |
<div class="status <?php echo strtolower($req['05']); ?>"><?php echo $req['05']; ?></div>
|
304 |
+
<div class="title" data-type="toggle" data-target="#s1-reqs05">+ PHP Min Version</div>
|
305 |
<div class="info" id="s1-reqs05">
|
306 |
This server is running PHP: <b><?php echo DUPX_Server::$php_version ?></b>. <i>A minimum of PHP 5.2.17 is required</i>.
|
307 |
Contact your hosting provider or server administrator and let them know you would like to upgrade your PHP version.
|
361 |
<div class="status <?php echo ($notice['03'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['03']; ?></div>
|
362 |
<div class="title" data-type="toggle" data-target="#s1-notice03">+ Package Age</div>
|
363 |
<div class="info" id="s1-notice03">
|
364 |
+
<?php echo "The package is {$fulldays} day(s) old. Packages older than 120 days might be considered stale. If you are comfortable with a package that that was created over "
|
365 |
+
. "four months ago please ignore this notice."; ?>
|
366 |
</div>
|
367 |
|
368 |
<!-- NOTICE 4
|
371 |
<div class="info" id="s1-notice04">
|
372 |
</div>-->
|
373 |
|
374 |
+
<!-- NOTICE 5 -->
|
|
|
375 |
<div class="status <?php echo ($notice['05'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['05']; ?></div>
|
376 |
+
<div class="title" data-type="toggle" data-target="#s1-notice05">+ PHP Version 5.2</div>
|
377 |
<div class="info" id="s1-notice05">
|
378 |
<?php
|
379 |
+
$currentPHP = DUPX_Server::$php_version;
|
380 |
+
$cssStyle = DUPX_Server::$php_version_53_plus ? 'color:green' : 'color:red';
|
381 |
+
echo "<b style='{$cssStyle}'>This server is currently running PHP version [{$currentPHP}]</b>.<br/>"
|
382 |
+
. "Duplicator allows PHP 5.2 to be used during install but does not officially support it. If your using PHP 5.2 we strongly recommend NOT using it and having your "
|
383 |
+
. "host upgrade to a newer more stable, secure and widely supported version. The <a href='http://php.net/eol.php' target='_blank'>end of life for PHP 5.2</a> "
|
384 |
+
. "was in January of 2011 and is not recommended for use.<br/><br/>";
|
385 |
+
|
386 |
+
echo "Many plugin and theme authors are no longer supporting PHP 5.2 and trying to use it can result in site wide problems and compatibility warnings and errors. "
|
387 |
+
. "Please note if you continue with the install using PHP 5.2 the Duplicator support team will not be able to help with issues or troubleshooting your site. "
|
388 |
+
. "If your server is running <b>PHP 5.3+</b> please feel free to reach out for help if you run into issues with your migration/install.";
|
389 |
?>
|
390 |
+
</div>
|
391 |
|
392 |
<!-- NOTICE 6 -->
|
393 |
<div class="status <?php echo ($notice['06'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['06']; ?></div>
|
396 |
<b>Open BaseDir:</b> <i><?php echo $notice['06'] == 'Good' ? "<i class='dupx-pass'>Disabled</i>" : "<i class='dupx-fail'>Enabled</i>"; ?></i>
|
397 |
<br/><br/>
|
398 |
|
399 |
+
If <a href="http://www.php.net/manual/en/ini.core.php#ini.open-basedir" target="_blank">open_basedir</a> is enabled and you're
|
400 |
having issues getting your site to install properly; please work with your host and follow these steps to prevent issues:
|
401 |
<ol style="margin:7px; line-height:19px">
|
402 |
<li>Disable the open_basedir setting in the php.ini file</li>
|
414 |
<div class="title" data-type="toggle" data-target="#s1-notice07">+ PHP Timeout</div>
|
415 |
<div class="info" id="s1-notice07">
|
416 |
<b>Archive Size:</b> <?php echo DUPX_U::readableByteSize($arcSize) ?> <small>(detection limit is set at <?php echo DUPX_U::readableByteSize($max_time_size) ?>) </small><br/>
|
417 |
+
<b>PHP max_execution_time:</b> <?php echo "{$max_time_ini}"; ?> <small>(zero means no limit)</small> <br/>
|
418 |
<b>PHP set_time_limit:</b> <?php echo ($max_time_zero) ? '<i style="color:green">Success</i>' : '<i style="color:maroon">Failed</i>' ?>
|
419 |
<br/><br/>
|
420 |
|
427 |
<a href="http://php.net/manual/en/function.set-time-limit.php" target="_blank">set_time_limit</a> setting. If this notice shows as a warning then it is
|
428 |
still safe to continue with the install. However, if a timeout occurs then you will need to consider working with the max_execution_time setting or extracting the
|
429 |
archive file using the 'Manual package extraction' method.
|
430 |
+
Please see the <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=installer_timeout#faq-trouble-100-q" target="_blank">FAQ timeout</a> help link for more details.
|
431 |
|
432 |
</div>
|
433 |
</div>
|
496 |
<table style='width:100%'>
|
497 |
<tr>
|
498 |
<td style="width:200px">
|
499 |
+
» Watch the <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=installer_vid_tutor#faq-resource-070-q" target="_blank">video tutorials</a> <br/>
|
500 |
+
» Read helpful <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=installer_help_art" target="_blank">articles</a> <br/>
|
501 |
</td>
|
502 |
<td>
|
503 |
+
» Visit the <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_quickstart" target="_blank">quick start guides</a> <br/>
|
504 |
+
» Browse the <a href="https://snapcreek.com/duplicator/docs/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=installer_online_docs" target="_blank">online docs</a> <br/>
|
505 |
</td>
|
506 |
</tr>
|
507 |
</table>
|
514 |
<!-- ====================================
|
515 |
NOTICES
|
516 |
==================================== -->
|
517 |
+
<div id="dialog-server-notice" style="display:none">
|
518 |
+
<div id="s1-warning-msg">
|
519 |
+
<b>TERMS & NOTICES</b> <br/><br/>
|
520 |
+
|
521 |
+
<b>Disclaimer:</b>
|
522 |
+
The Duplicator software and installer should be used at your own risk. Users should always back up or have backups of your database and files before running this installer.
|
523 |
+
If you're not sure about how to use this tool then please enlist the guidance of a technical professional. <u>Always</u> test this installer in a sandbox environment
|
524 |
+
before trying to deploy into a production environment. Be sure that if anything happens during the install that you have a backup recovery plan in place. By accepting
|
525 |
+
this agreement the users of this software do not hold liable Snapcreek LLC or any of its affiliates/members liable for any issues that might occur during use of this software.
|
526 |
+
<br/><br/>
|
527 |
+
|
528 |
+
|
529 |
+
<b>Database:</b>
|
530 |
+
Do not connect to an existing database unless you are 100% sure you want to remove all of it's data. Connecting to a database that already exists will permanently
|
531 |
+
DELETE all data in that database. This tool is designed to populate and fill a database with NEW data from a duplicated database using the SQL script in the
|
532 |
+
package name above.
|
533 |
+
<br/><br/>
|
534 |
+
|
535 |
+
<b>Setup:</b>
|
536 |
+
Only the archive and installer file should be in the install directory, unless you have manually extracted the package and checked the
|
537 |
+
'Manual Package Extraction' checkbox. All other files will be OVERWRITTEN during install. Make sure you have full backups of all your databases and files
|
538 |
+
before continuing with an installation. Manual extraction requires that all contents in the package are extracted to the same directory as the installer file.
|
539 |
+
Manual extraction is only needed when your server does not support the ZipArchive extension. Please see the online help for more details.
|
540 |
+
<br/><br/>
|
541 |
+
|
542 |
+
<b>After Install:</b> When you are done with the installation you must remove the these files/directories:
|
543 |
+
<ul>
|
544 |
+
<li>installer.php</li>
|
545 |
+
<li>installer-data.sql</li>
|
546 |
+
<li>installer-backup.php</li>
|
547 |
+
<li>installer-log.txt</li>
|
548 |
+
<li>database.sql</li>
|
549 |
+
</ul>
|
550 |
+
|
551 |
+
These files contain sensitive information and should not remain on a production system for system integrity and security protection.
|
552 |
+
<br/><br/>
|
553 |
+
|
554 |
+
<b>License Overview</b><br/>
|
555 |
+
Duplicator is licensed under the GPL v3 https://www.gnu.org/licenses/gpl-3.0.en.html including the following disclaimers and limitation of liability.
|
556 |
+
<br/><br/>
|
557 |
+
|
558 |
+
<b>Disclaimer of Warranty</b><br/>
|
559 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
560 |
+
PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
561 |
+
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
|
562 |
+
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
563 |
+
<br/><br/>
|
564 |
+
|
565 |
+
<b>Limitation of Liability</b><br/>
|
566 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
|
567 |
+
PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
568 |
+
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO
|
569 |
+
OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
570 |
+
<br/><br/>
|
|
|
|
|
|
|
|
|
|
|
571 |
</div>
|
572 |
</div>
|
573 |
|
574 |
<div id="s1-warning-check">
|
575 |
<input id="accept-warnings" name="accpet-warnings" type="checkbox" onclick="DUPX.acceptWarning()" />
|
576 |
+
<label for="accept-warnings">I have read and accept all <a href="javascript:void(0)" onclick="DUPX.showNotices()">terms & notices</a> <small style="font-style:italic">(required to continue)</small></label><br/>
|
577 |
</div>
|
578 |
|
579 |
|
584 |
server administrator, hosting provider or visit the resources below for additional help.
|
585 |
</i>
|
586 |
<div style="padding:10px">
|
587 |
+
» <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_validfail_techfaq" target="_blank">Technical FAQs</a> <br/>
|
588 |
+
» <a href="https://snapcreek.com/support/docs/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_validfail_onlinedocs" target="_blank">Online Documentation</a> <br/>
|
589 |
</div>
|
590 |
</div> <br/><br/>
|
591 |
<?php else : ?>
|
635 |
<div id="ajaxerr-area" style="display:none">
|
636 |
<p>Please try again an issue has occurred.</p>
|
637 |
<div style="padding: 0px 10px 10px 0px;">
|
638 |
+
<div id="ajaxerr-data">An unknown issue has occurred with the file and database set up process. Please see the installer-log.txt file for more details.</div>
|
639 |
<div style="text-align:center; margin:10px auto 0px auto">
|
640 |
<input type="button" class="default-btn" onclick="DUPX.hideErrorResult()" value="« Try Again" /><br/><br/>
|
641 |
+
<i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_ajaxerr_ticket' target='_blank'>snapcreek.com</a></i>
|
642 |
</div>
|
643 |
</div>
|
644 |
</div>
|
696 |
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
697 |
status += "- Check the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for warnings or errors.<br/>";
|
698 |
status += "- Check the web server and PHP error logs. <br/>";
|
699 |
+
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_ajaxextract_tofaq#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
|
700 |
$('#ajaxerr-data').html(status);
|
701 |
DUPX.hideProgressBar();
|
702 |
}
|
716 |
}
|
717 |
}
|
718 |
|
719 |
+
/** Server Terms Dialog*/
|
720 |
+
DUPX.showNotices = function()
|
721 |
+
{
|
722 |
+
modal({
|
723 |
+
type: 'alert',
|
724 |
+
title: 'Terms and Notices',
|
725 |
+
text: $('#dialog-server-notice').html()
|
726 |
+
});
|
727 |
+
}
|
728 |
+
|
729 |
+
|
730 |
/** Go back on AJAX result view */
|
731 |
DUPX.hideErrorResult = function()
|
732 |
{
|
installer/build/view.step2.php
CHANGED
@@ -1,418 +1,418 @@
|
|
1 |
-
<?php
|
2 |
-
$_POST['logging'] = isset($_POST['logging']) ? trim($_POST['logging']) : 1;
|
3 |
-
?>
|
4 |
-
|
5 |
-
|
6 |
-
<!-- =========================================
|
7 |
-
VIEW: STEP 2- INPUT -->
|
8 |
-
<form id='s2-input-form' method="post" class="content-form" data-parsley-validate="true" data-parsley-excluded="input[type=hidden], [disabled], :hidden">
|
9 |
-
<input type="hidden" name="action_ajax" value="2" />
|
10 |
-
<input type="hidden" name="action_step" value="2" />
|
11 |
-
<input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
|
12 |
-
<input type="hidden" name="logging" id="logging" value="<?php echo $_POST['logging'] ?>" />
|
13 |
-
|
14 |
-
<div class="dupx-logfile-link"><a href="installer-log.txt?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">installer-log.txt</a></div>
|
15 |
-
<div class="hdr-main">
|
16 |
-
Step <span class="step">2</span> of 4: Install Database
|
17 |
-
</div>
|
18 |
-
|
19 |
-
<div class="s2-btngrp">
|
20 |
-
<input id="s2-basic-btn" type="button" value="Basic" class="active" onclick="DUPX.togglePanels('basic')" />
|
21 |
-
<input id="s2-cpnl-btn" type="button" value="cPanel" class="in-active" onclick="DUPX.togglePanels('cpanel')" />
|
22 |
-
</div>
|
23 |
-
|
24 |
-
|
25 |
-
<!-- =========================================
|
26 |
-
BASIC PANEL -->
|
27 |
-
<div id="s2-basic-pane">
|
28 |
-
<div class="hdr-sub1" data-type="toggle" data-target="#s2-area-setup">
|
29 |
-
<a href="javascript:void(0)"><i class="dupx-minus-square"></i> Setup</a>
|
30 |
-
</div>
|
31 |
-
<div id="s2-area-setup">
|
32 |
-
<table class="dupx-opts">
|
33 |
-
<tr>
|
34 |
-
<td>Action:</td>
|
35 |
-
<td>
|
36 |
-
<select name="dbaction" id="dbaction">
|
37 |
-
<option value="create">Create New Database</option>
|
38 |
-
<option value="empty" selected="true">Connect and Remove All Data</option>
|
39 |
-
</select>
|
40 |
-
</td>
|
41 |
-
</tr>
|
42 |
-
<tr>
|
43 |
-
<td>Host:</td>
|
44 |
-
<td>
|
45 |
-
<table class="s2-opts-dbhost">
|
46 |
-
<tr>
|
47 |
-
<td><input type="text" name="dbhost" id="dbhost" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBHOST']); ?>" placeholder="localhost" style="width:450px" /></td>
|
48 |
-
<td style="vertical-align:top">
|
49 |
-
<input id="s2-dbport-btn" type="button" onclick="DUPX.togglePort()" class="s2-small-btn" value="Port: <?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
|
50 |
-
<input name="dbport" id="dbport" type="text" style="width:80px; display:none" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
|
51 |
-
</td>
|
52 |
-
</tr>
|
53 |
-
</table>
|
54 |
-
</td>
|
55 |
-
</tr>
|
56 |
-
<tr>
|
57 |
-
<td>Database:</td>
|
58 |
-
<td>
|
59 |
-
<input type="text" name="dbname" id="dbname" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBNAME']); ?>" placeholder="new or existing database name" />
|
60 |
-
<div id="s2-warning-emptydb">
|
61 |
-
<label for="accept-warnings">Warning: The selected 'Action' above will remove <u>all data</u> from this database!</label>
|
62 |
-
</div>
|
63 |
-
</td>
|
64 |
-
</tr>
|
65 |
-
<tr>
|
66 |
-
<td>User:</td>
|
67 |
-
<td><input type="text" name="dbuser" id="dbuser" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBUSER']); ?>" placeholder="valid database username" /></td>
|
68 |
-
</tr>
|
69 |
-
<tr>
|
70 |
-
<td>Password:</td>
|
71 |
-
<td><input type="text" name="dbpass" id="dbpass" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPASS']); ?>" placeholder="valid database user password" /></td>
|
72 |
-
</tr>
|
73 |
-
</table>
|
74 |
-
</div>
|
75 |
-
</div>
|
76 |
-
|
77 |
-
|
78 |
-
<!-- =========================================
|
79 |
-
C-PANEL PANEL -->
|
80 |
-
<div id="s2-cpnl-pane">
|
81 |
-
<div class="s2-gopro">
|
82 |
-
<h2>cPanel Connectivity</h2>
|
83 |
-
|
84 |
-
<?php if( DUPX_U::isURLActive($_SERVER['SERVER_NAME'], 2083) ): ?>
|
85 |
-
<div class='s2-cpanel-login'>
|
86 |
-
<b>Login to this server's cPanel</b><br/>
|
87 |
-
<a href="https://<?php echo $_SERVER['SERVER_NAME'] ?>:2083" target="cpanel" style="color:#fff">[<?php echo $_SERVER['SERVER_NAME'] ?>:2083]</a>
|
88 |
-
</div>
|
89 |
-
<?php else : ?>
|
90 |
-
<div class='s2-cpanel-off'>
|
91 |
-
<b>This server does not appear to support cPanel!</b><br/>
|
92 |
-
Consider <a href="https://snapcreek.com/wordpress-hosting/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_no_cpanel&utm_campaign=duplicator_pro" target="cpanel" style="color:#fff;font-weight:bold">upgrading</a> to a host that does.<br/>
|
93 |
-
</div>
|
94 |
-
<?php endif; ?>
|
95 |
-
|
96 |
-
|
97 |
-
<div style="text-align: center; font-size: 14px">
|
98 |
-
Want <span style="font-style: italic;">even easier</span> installs?
|
99 |
-
<a target="_blank" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_step2&utm_campaign=duplicator_pro"><b>Duplicator Pro</b></a>
|
100 |
-
allows the following <b>right from the installer:</b>
|
101 |
-
</div>
|
102 |
-
<ul>
|
103 |
-
<li>Directly login to cPanel</li>
|
104 |
-
<li>Instantly create new databases & users</li>
|
105 |
-
<li>Preview and select existing databases & users</li>
|
106 |
-
</ul>
|
107 |
-
<small>
|
108 |
-
Note: Hosts that support cPanel provide remote access to server resources, allowing operations such as direct database and user creation.
|
109 |
-
Since the <a target="_blank" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_cpanel_note&utm_campaign=duplicator_pro">Duplicator Pro</a>
|
110 |
-
installer can directly access cPanel, it dramatically speeds up your workflow.
|
111 |
-
</small>
|
112 |
-
</div>
|
113 |
-
</div>
|
114 |
-
|
115 |
-
<!-- =========================================
|
116 |
-
DIALOG: DB CONNECTION CHECK -->
|
117 |
-
<div id="s2-dbconn">
|
118 |
-
<div id="s2-dbconn-status" style="display:none">
|
119 |
-
<div style="padding: 0px 10px 10px 10px;">
|
120 |
-
<div id="s2-dbconn-test-msg" style="min-height:80px"></div>
|
121 |
-
</div>
|
122 |
-
<small><input type="button" onclick="$('#s2-dbconn-status').hide(500)" class="s2-small-btn" value="Hide Message" /></small>
|
123 |
-
</div>
|
124 |
-
</div>
|
125 |
-
|
126 |
-
|
127 |
-
<br/>
|
128 |
-
|
129 |
-
<!-- ====================================
|
130 |
-
OPTIONS
|
131 |
-
==================================== -->
|
132 |
-
<div class="hdr-sub1" data-type="toggle" data-target="#s2-area-adv-opts">
|
133 |
-
<a href="javascript:void(0)"><i class="dupx-plus-square"></i> Options</a>
|
134 |
-
</div>
|
135 |
-
<div id='s2-area-adv-opts' style="display:none">
|
136 |
-
<div class="help-target"><a href="?help#help-s2" target="_blank">[help]</a></div>
|
137 |
-
|
138 |
-
<table class="dupx-opts dupx-advopts">
|
139 |
-
<tr>
|
140 |
-
<td>Spacing:</td>
|
141 |
-
<td colspan="2">
|
142 |
-
<input type="checkbox" name="dbnbsp" id="dbnbsp" value="1" /> <label for="dbnbsp">Fix non-breaking space characters</label>
|
143 |
-
</td>
|
144 |
-
</tr>
|
145 |
-
<tr>
|
146 |
-
<td style="vertical-align:top">Mode:</td>
|
147 |
-
<td colspan="2">
|
148 |
-
<input type="radio" name="dbmysqlmode" id="dbmysqlmode_1" checked="true" value="DEFAULT"/> <label for="dbmysqlmode_1">Default</label>
|
149 |
-
<input type="radio" name="dbmysqlmode" id="dbmysqlmode_2" value="DISABLE"/> <label for="dbmysqlmode_2">Disable</label>
|
150 |
-
<input type="radio" name="dbmysqlmode" id="dbmysqlmode_3" value="CUSTOM"/> <label for="dbmysqlmode_3">Custom</label>
|
151 |
-
<div id="dbmysqlmode_3_view" style="display:none; padding:5px">
|
152 |
-
<input type="text" name="dbmysqlmode_opts" value="" /><br/>
|
153 |
-
<small>Separate additional <a href="?help#help-mysql-mode" target="_blank">sql modes</a> with commas & no spaces.<br/>
|
154 |
-
Example: <i>NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE,...</i>.</small>
|
155 |
-
</div>
|
156 |
-
</td>
|
157 |
-
</tr>
|
158 |
-
<tr><td style="width:130px">Charset:</td><td><input type="text" name="dbcharset" id="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" /> </td></tr>
|
159 |
-
<tr><td>Collation:</td><td><input type="text" name="dbcollate" id="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" /> </tr>
|
160 |
-
</table>
|
161 |
-
|
162 |
-
</div>
|
163 |
-
<br/><br/><br/>
|
164 |
-
<br/><br/><br/>
|
165 |
-
|
166 |
-
<div class="dupx-footer-buttons">
|
167 |
-
<input type="button" onclick="DUPX.testDatabase()" class="default-btn" value="Test Database" />
|
168 |
-
<input id="dup-step2-deploy-btn" type="button" class="default-btn" value=" Next " onclick="DUPX.confirmDeployment()" />
|
169 |
-
</div>
|
170 |
-
|
171 |
-
</form>
|
172 |
-
|
173 |
-
|
174 |
-
<!-- =========================================
|
175 |
-
VIEW: STEP 2 - AJAX RESULT
|
176 |
-
Auto Posts to view.step3.php
|
177 |
-
========================================= -->
|
178 |
-
<form id='s2-result-form' method="post" class="content-form" style="display:none">
|
179 |
-
|
180 |
-
<div class="dupx-logfile-link"><a href="installer-log.txt" target="install_log">installer-log.txt</a></div>
|
181 |
-
<div class="hdr-main">
|
182 |
-
Step <span class="step">2</span> of 4: Install Database
|
183 |
-
</div>
|
184 |
-
|
185 |
-
<!-- POST PARAMS -->
|
186 |
-
<div class="dupx-debug">
|
187 |
-
<input type="hidden" name="action_step" value="3" />
|
188 |
-
<input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
|
189 |
-
<input type="hidden" name="logging" id="ajax-logging" />
|
190 |
-
<input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
|
191 |
-
<input type="hidden" name="dbhost" id="ajax-dbhost" />
|
192 |
-
<input type="hidden" name="dbport" id="ajax-dbport" />
|
193 |
-
<input type="hidden" name="dbuser" id="ajax-dbuser" />
|
194 |
-
<input type="hidden" name="dbpass" id="ajax-dbpass" />
|
195 |
-
<input type="hidden" name="dbname" id="ajax-dbname" />
|
196 |
-
<input type="hidden" name="json" id="ajax-json" />
|
197 |
-
<input type="hidden" name="dbcharset" id="ajax-dbcharset" />
|
198 |
-
<input type="hidden" name="dbcollate" id="ajax-dbcollate" />
|
199 |
-
<br/>
|
200 |
-
<input type='submit' value='manual submit'>
|
201 |
-
</div>
|
202 |
-
|
203 |
-
<!-- PROGRESS BAR -->
|
204 |
-
<div id="progress-area">
|
205 |
-
<div style="width:500px; margin:auto">
|
206 |
-
<h3>Installing Database Please Wait...</h3>
|
207 |
-
<div id="progress-bar"></div>
|
208 |
-
<i>This may take several minutes</i>
|
209 |
-
</div>
|
210 |
-
</div>
|
211 |
-
|
212 |
-
<!-- AJAX SYSTEM ERROR -->
|
213 |
-
<div id="ajaxerr-area" style="display:none">
|
214 |
-
<p>Please try again an issue has occurred.</p>
|
215 |
-
<div style="padding: 0px 10px 10px 0px;">
|
216 |
-
<div id="ajaxerr-data">An unknown issue has occurred with the file and database
|
217 |
-
<div style="text-align:center; margin:10px auto 0px auto">
|
218 |
-
<input type="button" class="default-btn" onclick='DUPX.hideErrorResult()' value="« Try Again" /><br/><br/>
|
219 |
-
<i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket' target='_blank'>snapcreek.com</a></i>
|
220 |
-
</div>
|
221 |
-
</div>
|
222 |
-
</div>
|
223 |
-
</form>
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
<!-- CONFIRM DIALOG -->
|
228 |
-
<div id="dialog-confirm-content" style="display:none">
|
229 |
-
<div style="padding:0 0 25px 0">
|
230 |
-
<b>Run installer with these settings?</b>
|
231 |
-
</div>
|
232 |
-
|
233 |
-
<b>Database Settings:</b><br/>
|
234 |
-
<table style="margin-left:20px">
|
235 |
-
<tr>
|
236 |
-
<td><b>Server:</b></td>
|
237 |
-
<td><i id="dlg-dbhost"></i></td>
|
238 |
-
</tr>
|
239 |
-
<tr>
|
240 |
-
<td><b>Name:</b></td>
|
241 |
-
<td><i id="dlg-dbname"></i></td>
|
242 |
-
</tr>
|
243 |
-
<tr>
|
244 |
-
<td><b>User:</b></td>
|
245 |
-
<td><i id="dlg-dbuser"></i></td>
|
246 |
-
</tr>
|
247 |
-
</table>
|
248 |
-
<br/><br/>
|
249 |
-
|
250 |
-
<small> WARNING: Be sure these database parameters are correct! Entering the wrong information WILL overwrite an existing database.
|
251 |
-
Make sure to have backups of all your data before proceeding.</small><br/>
|
252 |
-
</div>
|
253 |
-
|
254 |
-
|
255 |
-
<script>
|
256 |
-
/* Confirm Dialog to validate run */
|
257 |
-
DUPX.confirmDeployment = function()
|
258 |
-
{
|
259 |
-
var $form = $('#s2-input-form');
|
260 |
-
$form.parsley().validate();
|
261 |
-
if (!$form.parsley().isValid()) {
|
262 |
-
return;
|
263 |
-
}
|
264 |
-
|
265 |
-
$('#dlg-dbhost').html($("#dbhost").val());
|
266 |
-
$('#dlg-dbname').html($("#dbname").val());
|
267 |
-
$('#dlg-dbuser').html($("#dbuser").val());
|
268 |
-
|
269 |
-
modal({
|
270 |
-
type: 'confirm',
|
271 |
-
title: 'Install Confirmation',
|
272 |
-
text: $('#dialog-confirm-content').html(),
|
273 |
-
callback: function(result)
|
274 |
-
{
|
275 |
-
if (result == true) {
|
276 |
-
DUPX.runDeployment();
|
277 |
-
}
|
278 |
-
}
|
279 |
-
});
|
280 |
-
}
|
281 |
-
|
282 |
-
|
283 |
-
/* Performs Ajax post to extract files and create db
|
284 |
-
* Timeout (10000000 = 166 minutes) */
|
285 |
-
DUPX.runDeployment = function()
|
286 |
-
{
|
287 |
-
var $form = $('#s2-input-form');
|
288 |
-
var dbhost = $("#dbhost").val();
|
289 |
-
var dbname = $("#dbname").val();
|
290 |
-
var dbuser = $("#dbuser").val();
|
291 |
-
|
292 |
-
$.ajax({
|
293 |
-
type: "POST",
|
294 |
-
timeout: 1800000,
|
295 |
-
dataType: "json",
|
296 |
-
url: window.location.href,
|
297 |
-
data: $form.serialize(),
|
298 |
-
beforeSend: function() {
|
299 |
-
DUPX.showProgressBar();
|
300 |
-
$form.hide();
|
301 |
-
$('#s2-result-form').show();
|
302 |
-
},
|
303 |
-
success: function(data, textStatus, xhr){
|
304 |
-
if (typeof(data) != 'undefined' && data.pass == 1) {
|
305 |
-
$("#ajax-dbhost").val($("#dbhost").val());
|
306 |
-
$("#ajax-dbport").val($("#dbport").val());
|
307 |
-
$("#ajax-dbuser").val($("#dbuser").val());
|
308 |
-
$("#ajax-dbpass").val($("#dbpass").val());
|
309 |
-
$("#ajax-dbname").val($("#dbname").val());
|
310 |
-
$("#ajax-dbcharset").val($("#dbcharset").val());
|
311 |
-
$("#ajax-dbcollate").val($("#dbcollate").val());
|
312 |
-
$("#ajax-logging").val($("#logging").val());
|
313 |
-
$("#ajax-json").val(escape(JSON.stringify(data)));
|
314 |
-
<?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
|
315 |
-
setTimeout(function() {$('#s2-result-form').submit();}, 500);
|
316 |
-
<?php endif; ?>
|
317 |
-
$('#progress-area').fadeOut(1000);
|
318 |
-
} else {
|
319 |
-
DUPX.hideProgressBar();
|
320 |
-
}
|
321 |
-
},
|
322 |
-
error: function(xhr) {
|
323 |
-
var status = "<b>Server Code:</b> " + xhr.status + "<br/>";
|
324 |
-
status += "<b>Status:</b> " + xhr.statusText + "<br/>";
|
325 |
-
status += "<b>Response:</b> " + xhr.responseText + "";
|
326 |
-
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
327 |
-
status += "- Check the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for warnings or errors.<br/>";
|
328 |
-
status += "- Check the web server and PHP error logs. <br/>";
|
329 |
-
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech
|
330 |
-
$('#ajaxerr-data').html(status);
|
331 |
-
DUPX.hideProgressBar();
|
332 |
-
}
|
333 |
-
});
|
334 |
-
|
335 |
-
}
|
336 |
-
|
337 |
-
/**
|
338 |
-
* Toggles the cpanel Login area */
|
339 |
-
DUPX.togglePanels = function (pane)
|
340 |
-
{
|
341 |
-
$('#s2-basic-pane, #s2-cpnl-pane').hide();
|
342 |
-
$('#s2-basic-btn, #s2-cpnl-btn').removeClass('active in-active');
|
343 |
-
if (pane == 'basic') {
|
344 |
-
$('#s2-basic-pane').show();
|
345 |
-
$('#s2-basic-btn').addClass('active');
|
346 |
-
$('#s2-cpnl-btn').addClass('in-active');
|
347 |
-
} else {
|
348 |
-
$('#s2-cpnl-pane').show(200);
|
349 |
-
$('#s2-cpnl-btn').addClass('active');
|
350 |
-
$('#s2-basic-btn').addClass('in-active');
|
351 |
-
}
|
352 |
-
}
|
353 |
-
|
354 |
-
|
355 |
-
/** Go back on AJAX result view */
|
356 |
-
DUPX.hideErrorResult = function()
|
357 |
-
{
|
358 |
-
$('#s2-result-form').hide();
|
359 |
-
$('#s2-input-form').show(200);
|
360 |
-
}
|
361 |
-
|
362 |
-
|
363 |
-
/** Shows results of database connection
|
364 |
-
* Timeout (45000 = 45 secs) */
|
365 |
-
DUPX.testDatabase = function ()
|
366 |
-
{
|
367 |
-
$.ajax({
|
368 |
-
type: "POST",
|
369 |
-
timeout: 45000,
|
370 |
-
url: window.location.href + '?' + 'dbtest=1',
|
371 |
-
data: $('#s2-input-form').serialize(),
|
372 |
-
success: function(data){ $('#s2-dbconn-test-msg').html(data); },
|
373 |
-
error: function(data){ alert('An error occurred while testing the database connection! Contact your server admin to make sure the connection inputs are correct!'); }
|
374 |
-
});
|
375 |
-
|
376 |
-
$('#s2-dbconn-test-msg').html("Attempting Connection. Please wait...");
|
377 |
-
$("#s2-dbconn-status").show(100);
|
378 |
-
|
379 |
-
}
|
380 |
-
|
381 |
-
|
382 |
-
DUPX.showDeleteWarning = function ()
|
383 |
-
{
|
384 |
-
($('#dbaction').val() == 'empty')
|
385 |
-
? $('#s2-warning-emptydb').show(200)
|
386 |
-
: $('#s2-warning-emptydb').hide(200);
|
387 |
-
}
|
388 |
-
|
389 |
-
|
390 |
-
DUPX.togglePort = function ()
|
391 |
-
{
|
392 |
-
$('#s2-dbport-btn').hide();
|
393 |
-
$('#dbport').show();
|
394 |
-
}
|
395 |
-
|
396 |
-
|
397 |
-
//DOCUMENT LOAD
|
398 |
-
$(document).ready(function()
|
399 |
-
{
|
400 |
-
$('#dup-s2-dialog-data').appendTo('#dup-s2-result-container');
|
401 |
-
$("select#dbaction").click(DUPX.showDeleteWarning);
|
402 |
-
DUPX.showDeleteWarning();
|
403 |
-
|
404 |
-
//MySQL Mode
|
405 |
-
$("input[name=dbmysqlmode]").click(function() {
|
406 |
-
if ($(this).val() == 'CUSTOM') {
|
407 |
-
$('#dbmysqlmode_3_view').show();
|
408 |
-
} else {
|
409 |
-
$('#dbmysqlmode_3_view').hide();
|
410 |
-
}
|
411 |
-
});
|
412 |
-
|
413 |
-
if ($("input[name=dbmysqlmode]:checked").val() == 'CUSTOM') {
|
414 |
-
$('#dbmysqlmode_3_view').show();
|
415 |
-
}
|
416 |
-
$("*[data-type='toggle']").click(DUPX.toggleClick);
|
417 |
-
});
|
418 |
-
</script>
|
1 |
+
<?php
|
2 |
+
$_POST['logging'] = isset($_POST['logging']) ? trim($_POST['logging']) : 1;
|
3 |
+
?>
|
4 |
+
|
5 |
+
|
6 |
+
<!-- =========================================
|
7 |
+
VIEW: STEP 2- INPUT -->
|
8 |
+
<form id='s2-input-form' method="post" class="content-form" data-parsley-validate="true" data-parsley-excluded="input[type=hidden], [disabled], :hidden">
|
9 |
+
<input type="hidden" name="action_ajax" value="2" />
|
10 |
+
<input type="hidden" name="action_step" value="2" />
|
11 |
+
<input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
|
12 |
+
<input type="hidden" name="logging" id="logging" value="<?php echo $_POST['logging'] ?>" />
|
13 |
+
|
14 |
+
<div class="dupx-logfile-link"><a href="installer-log.txt?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">installer-log.txt</a></div>
|
15 |
+
<div class="hdr-main">
|
16 |
+
Step <span class="step">2</span> of 4: Install Database
|
17 |
+
</div>
|
18 |
+
|
19 |
+
<div class="s2-btngrp">
|
20 |
+
<input id="s2-basic-btn" type="button" value="Basic" class="active" onclick="DUPX.togglePanels('basic')" />
|
21 |
+
<input id="s2-cpnl-btn" type="button" value="cPanel" class="in-active" onclick="DUPX.togglePanels('cpanel')" />
|
22 |
+
</div>
|
23 |
+
|
24 |
+
|
25 |
+
<!-- =========================================
|
26 |
+
BASIC PANEL -->
|
27 |
+
<div id="s2-basic-pane">
|
28 |
+
<div class="hdr-sub1" data-type="toggle" data-target="#s2-area-setup">
|
29 |
+
<a href="javascript:void(0)"><i class="dupx-minus-square"></i> Setup</a>
|
30 |
+
</div>
|
31 |
+
<div id="s2-area-setup">
|
32 |
+
<table class="dupx-opts">
|
33 |
+
<tr>
|
34 |
+
<td>Action:</td>
|
35 |
+
<td>
|
36 |
+
<select name="dbaction" id="dbaction">
|
37 |
+
<option value="create">Create New Database</option>
|
38 |
+
<option value="empty" selected="true">Connect and Remove All Data</option>
|
39 |
+
</select>
|
40 |
+
</td>
|
41 |
+
</tr>
|
42 |
+
<tr>
|
43 |
+
<td>Host:</td>
|
44 |
+
<td>
|
45 |
+
<table class="s2-opts-dbhost">
|
46 |
+
<tr>
|
47 |
+
<td><input type="text" name="dbhost" id="dbhost" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBHOST']); ?>" placeholder="localhost" style="width:450px" /></td>
|
48 |
+
<td style="vertical-align:top">
|
49 |
+
<input id="s2-dbport-btn" type="button" onclick="DUPX.togglePort()" class="s2-small-btn" value="Port: <?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
|
50 |
+
<input name="dbport" id="dbport" type="text" style="width:80px; display:none" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
|
51 |
+
</td>
|
52 |
+
</tr>
|
53 |
+
</table>
|
54 |
+
</td>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<td>Database:</td>
|
58 |
+
<td>
|
59 |
+
<input type="text" name="dbname" id="dbname" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBNAME']); ?>" placeholder="new or existing database name" />
|
60 |
+
<div id="s2-warning-emptydb">
|
61 |
+
<label for="accept-warnings">Warning: The selected 'Action' above will remove <u>all data</u> from this database!</label>
|
62 |
+
</div>
|
63 |
+
</td>
|
64 |
+
</tr>
|
65 |
+
<tr>
|
66 |
+
<td>User:</td>
|
67 |
+
<td><input type="text" name="dbuser" id="dbuser" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBUSER']); ?>" placeholder="valid database username" /></td>
|
68 |
+
</tr>
|
69 |
+
<tr>
|
70 |
+
<td>Password:</td>
|
71 |
+
<td><input type="text" name="dbpass" id="dbpass" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPASS']); ?>" placeholder="valid database user password" /></td>
|
72 |
+
</tr>
|
73 |
+
</table>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
|
77 |
+
|
78 |
+
<!-- =========================================
|
79 |
+
C-PANEL PANEL -->
|
80 |
+
<div id="s2-cpnl-pane">
|
81 |
+
<div class="s2-gopro">
|
82 |
+
<h2>cPanel Connectivity</h2>
|
83 |
+
|
84 |
+
<?php if( DUPX_U::isURLActive($_SERVER['SERVER_NAME'], 2083) ): ?>
|
85 |
+
<div class='s2-cpanel-login'>
|
86 |
+
<b>Login to this server's cPanel</b><br/>
|
87 |
+
<a href="https://<?php echo $_SERVER['SERVER_NAME'] ?>:2083" target="cpanel" style="color:#fff">[<?php echo $_SERVER['SERVER_NAME'] ?>:2083]</a>
|
88 |
+
</div>
|
89 |
+
<?php else : ?>
|
90 |
+
<div class='s2-cpanel-off'>
|
91 |
+
<b>This server does not appear to support cPanel!</b><br/>
|
92 |
+
Consider <a href="https://snapcreek.com/wordpress-hosting/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_no_cpanel&utm_campaign=duplicator_pro" target="cpanel" style="color:#fff;font-weight:bold">upgrading</a> to a host that does.<br/>
|
93 |
+
</div>
|
94 |
+
<?php endif; ?>
|
95 |
+
|
96 |
+
|
97 |
+
<div style="text-align: center; font-size: 14px">
|
98 |
+
Want <span style="font-style: italic;">even easier</span> installs?
|
99 |
+
<a target="_blank" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_step2&utm_campaign=duplicator_pro"><b>Duplicator Pro</b></a>
|
100 |
+
allows the following <b>right from the installer:</b>
|
101 |
+
</div>
|
102 |
+
<ul>
|
103 |
+
<li>Directly login to cPanel</li>
|
104 |
+
<li>Instantly create new databases & users</li>
|
105 |
+
<li>Preview and select existing databases & users</li>
|
106 |
+
</ul>
|
107 |
+
<small>
|
108 |
+
Note: Hosts that support cPanel provide remote access to server resources, allowing operations such as direct database and user creation.
|
109 |
+
Since the <a target="_blank" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_cpanel_note&utm_campaign=duplicator_pro">Duplicator Pro</a>
|
110 |
+
installer can directly access cPanel, it dramatically speeds up your workflow.
|
111 |
+
</small>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<!-- =========================================
|
116 |
+
DIALOG: DB CONNECTION CHECK -->
|
117 |
+
<div id="s2-dbconn">
|
118 |
+
<div id="s2-dbconn-status" style="display:none">
|
119 |
+
<div style="padding: 0px 10px 10px 10px;">
|
120 |
+
<div id="s2-dbconn-test-msg" style="min-height:80px"></div>
|
121 |
+
</div>
|
122 |
+
<small><input type="button" onclick="$('#s2-dbconn-status').hide(500)" class="s2-small-btn" value="Hide Message" /></small>
|
123 |
+
</div>
|
124 |
+
</div>
|
125 |
+
|
126 |
+
|
127 |
+
<br/>
|
128 |
+
|
129 |
+
<!-- ====================================
|
130 |
+
OPTIONS
|
131 |
+
==================================== -->
|
132 |
+
<div class="hdr-sub1" data-type="toggle" data-target="#s2-area-adv-opts">
|
133 |
+
<a href="javascript:void(0)"><i class="dupx-plus-square"></i> Options</a>
|
134 |
+
</div>
|
135 |
+
<div id='s2-area-adv-opts' style="display:none">
|
136 |
+
<div class="help-target"><a href="?help#help-s2" target="_blank">[help]</a></div>
|
137 |
+
|
138 |
+
<table class="dupx-opts dupx-advopts">
|
139 |
+
<tr>
|
140 |
+
<td>Spacing:</td>
|
141 |
+
<td colspan="2">
|
142 |
+
<input type="checkbox" name="dbnbsp" id="dbnbsp" value="1" /> <label for="dbnbsp">Fix non-breaking space characters</label>
|
143 |
+
</td>
|
144 |
+
</tr>
|
145 |
+
<tr>
|
146 |
+
<td style="vertical-align:top">Mode:</td>
|
147 |
+
<td colspan="2">
|
148 |
+
<input type="radio" name="dbmysqlmode" id="dbmysqlmode_1" checked="true" value="DEFAULT"/> <label for="dbmysqlmode_1">Default</label>
|
149 |
+
<input type="radio" name="dbmysqlmode" id="dbmysqlmode_2" value="DISABLE"/> <label for="dbmysqlmode_2">Disable</label>
|
150 |
+
<input type="radio" name="dbmysqlmode" id="dbmysqlmode_3" value="CUSTOM"/> <label for="dbmysqlmode_3">Custom</label>
|
151 |
+
<div id="dbmysqlmode_3_view" style="display:none; padding:5px">
|
152 |
+
<input type="text" name="dbmysqlmode_opts" value="" /><br/>
|
153 |
+
<small>Separate additional <a href="?help#help-mysql-mode" target="_blank">sql modes</a> with commas & no spaces.<br/>
|
154 |
+
Example: <i>NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE,...</i>.</small>
|
155 |
+
</div>
|
156 |
+
</td>
|
157 |
+
</tr>
|
158 |
+
<tr><td style="width:130px">Charset:</td><td><input type="text" name="dbcharset" id="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" /> </td></tr>
|
159 |
+
<tr><td>Collation:</td><td><input type="text" name="dbcollate" id="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" /> </tr>
|
160 |
+
</table>
|
161 |
+
|
162 |
+
</div>
|
163 |
+
<br/><br/><br/>
|
164 |
+
<br/><br/><br/>
|
165 |
+
|
166 |
+
<div class="dupx-footer-buttons">
|
167 |
+
<input type="button" onclick="DUPX.testDatabase()" class="default-btn" value="Test Database" />
|
168 |
+
<input id="dup-step2-deploy-btn" type="button" class="default-btn" value=" Next " onclick="DUPX.confirmDeployment()" />
|
169 |
+
</div>
|
170 |
+
|
171 |
+
</form>
|
172 |
+
|
173 |
+
|
174 |
+
<!-- =========================================
|
175 |
+
VIEW: STEP 2 - AJAX RESULT
|
176 |
+
Auto Posts to view.step3.php
|
177 |
+
========================================= -->
|
178 |
+
<form id='s2-result-form' method="post" class="content-form" style="display:none">
|
179 |
+
|
180 |
+
<div class="dupx-logfile-link"><a href="installer-log.txt" target="install_log">installer-log.txt</a></div>
|
181 |
+
<div class="hdr-main">
|
182 |
+
Step <span class="step">2</span> of 4: Install Database
|
183 |
+
</div>
|
184 |
+
|
185 |
+
<!-- POST PARAMS -->
|
186 |
+
<div class="dupx-debug">
|
187 |
+
<input type="hidden" name="action_step" value="3" />
|
188 |
+
<input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
|
189 |
+
<input type="hidden" name="logging" id="ajax-logging" />
|
190 |
+
<input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
|
191 |
+
<input type="hidden" name="dbhost" id="ajax-dbhost" />
|
192 |
+
<input type="hidden" name="dbport" id="ajax-dbport" />
|
193 |
+
<input type="hidden" name="dbuser" id="ajax-dbuser" />
|
194 |
+
<input type="hidden" name="dbpass" id="ajax-dbpass" />
|
195 |
+
<input type="hidden" name="dbname" id="ajax-dbname" />
|
196 |
+
<input type="hidden" name="json" id="ajax-json" />
|
197 |
+
<input type="hidden" name="dbcharset" id="ajax-dbcharset" />
|
198 |
+
<input type="hidden" name="dbcollate" id="ajax-dbcollate" />
|
199 |
+
<br/>
|
200 |
+
<input type='submit' value='manual submit'>
|
201 |
+
</div>
|
202 |
+
|
203 |
+
<!-- PROGRESS BAR -->
|
204 |
+
<div id="progress-area">
|
205 |
+
<div style="width:500px; margin:auto">
|
206 |
+
<h3>Installing Database Please Wait...</h3>
|
207 |
+
<div id="progress-bar"></div>
|
208 |
+
<i>This may take several minutes</i>
|
209 |
+
</div>
|
210 |
+
</div>
|
211 |
+
|
212 |
+
<!-- AJAX SYSTEM ERROR -->
|
213 |
+
<div id="ajaxerr-area" style="display:none">
|
214 |
+
<p>Please try again an issue has occurred.</p>
|
215 |
+
<div style="padding: 0px 10px 10px 0px;">
|
216 |
+
<div id="ajaxerr-data">An unknown issue has occurred with the file and database set up process. Please see the installer-log.txt file for more details.</div>
|
217 |
+
<div style="text-align:center; margin:10px auto 0px auto">
|
218 |
+
<input type="button" class="default-btn" onclick='DUPX.hideErrorResult()' value="« Try Again" /><br/><br/>
|
219 |
+
<i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_ajaxstep2_ticket' target='_blank'>snapcreek.com</a></i>
|
220 |
+
</div>
|
221 |
+
</div>
|
222 |
+
</div>
|
223 |
+
</form>
|
224 |
+
|
225 |
+
|
226 |
+
|
227 |
+
<!-- CONFIRM DIALOG -->
|
228 |
+
<div id="dialog-confirm-content" style="display:none">
|
229 |
+
<div style="padding:0 0 25px 0">
|
230 |
+
<b>Run installer with these settings?</b>
|
231 |
+
</div>
|
232 |
+
|
233 |
+
<b>Database Settings:</b><br/>
|
234 |
+
<table style="margin-left:20px">
|
235 |
+
<tr>
|
236 |
+
<td><b>Server:</b></td>
|
237 |
+
<td><i id="dlg-dbhost"></i></td>
|
238 |
+
</tr>
|
239 |
+
<tr>
|
240 |
+
<td><b>Name:</b></td>
|
241 |
+
<td><i id="dlg-dbname"></i></td>
|
242 |
+
</tr>
|
243 |
+
<tr>
|
244 |
+
<td><b>User:</b></td>
|
245 |
+
<td><i id="dlg-dbuser"></i></td>
|
246 |
+
</tr>
|
247 |
+
</table>
|
248 |
+
<br/><br/>
|
249 |
+
|
250 |
+
<small> WARNING: Be sure these database parameters are correct! Entering the wrong information WILL overwrite an existing database.
|
251 |
+
Make sure to have backups of all your data before proceeding.</small><br/>
|
252 |
+
</div>
|
253 |
+
|
254 |
+
|
255 |
+
<script>
|
256 |
+
/* Confirm Dialog to validate run */
|
257 |
+
DUPX.confirmDeployment = function()
|
258 |
+
{
|
259 |
+
var $form = $('#s2-input-form');
|
260 |
+
$form.parsley().validate();
|
261 |
+
if (!$form.parsley().isValid()) {
|
262 |
+
return;
|
263 |
+
}
|
264 |
+
|
265 |
+
$('#dlg-dbhost').html($("#dbhost").val());
|
266 |
+
$('#dlg-dbname').html($("#dbname").val());
|
267 |
+
$('#dlg-dbuser').html($("#dbuser").val());
|
268 |
+
|
269 |
+
modal({
|
270 |
+
type: 'confirm',
|
271 |
+
title: 'Install Confirmation',
|
272 |
+
text: $('#dialog-confirm-content').html(),
|
273 |
+
callback: function(result)
|
274 |
+
{
|
275 |
+
if (result == true) {
|
276 |
+
DUPX.runDeployment();
|
277 |
+
}
|
278 |
+
}
|
279 |
+
});
|
280 |
+
}
|
281 |
+
|
282 |
+
|
283 |
+
/* Performs Ajax post to extract files and create db
|
284 |
+
* Timeout (10000000 = 166 minutes) */
|
285 |
+
DUPX.runDeployment = function()
|
286 |
+
{
|
287 |
+
var $form = $('#s2-input-form');
|
288 |
+
var dbhost = $("#dbhost").val();
|
289 |
+
var dbname = $("#dbname").val();
|
290 |
+
var dbuser = $("#dbuser").val();
|
291 |
+
|
292 |
+
$.ajax({
|
293 |
+
type: "POST",
|
294 |
+
timeout: 1800000,
|
295 |
+
dataType: "json",
|
296 |
+
url: window.location.href,
|
297 |
+
data: $form.serialize(),
|
298 |
+
beforeSend: function() {
|
299 |
+
DUPX.showProgressBar();
|
300 |
+
$form.hide();
|
301 |
+
$('#s2-result-form').show();
|
302 |
+
},
|
303 |
+
success: function(data, textStatus, xhr){
|
304 |
+
if (typeof(data) != 'undefined' && data.pass == 1) {
|
305 |
+
$("#ajax-dbhost").val($("#dbhost").val());
|
306 |
+
$("#ajax-dbport").val($("#dbport").val());
|
307 |
+
$("#ajax-dbuser").val($("#dbuser").val());
|
308 |
+
$("#ajax-dbpass").val($("#dbpass").val());
|
309 |
+
$("#ajax-dbname").val($("#dbname").val());
|
310 |
+
$("#ajax-dbcharset").val($("#dbcharset").val());
|
311 |
+
$("#ajax-dbcollate").val($("#dbcollate").val());
|
312 |
+
$("#ajax-logging").val($("#logging").val());
|
313 |
+
$("#ajax-json").val(escape(JSON.stringify(data)));
|
314 |
+
<?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
|
315 |
+
setTimeout(function() {$('#s2-result-form').submit();}, 500);
|
316 |
+
<?php endif; ?>
|
317 |
+
$('#progress-area').fadeOut(1000);
|
318 |
+
} else {
|
319 |
+
DUPX.hideProgressBar();
|
320 |
+
}
|
321 |
+
},
|
322 |
+
error: function(xhr) {
|
323 |
+
var status = "<b>Server Code:</b> " + xhr.status + "<br/>";
|
324 |
+
status += "<b>Status:</b> " + xhr.statusText + "<br/>";
|
325 |
+
status += "<b>Response:</b> " + xhr.responseText + "";
|
326 |
+
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
327 |
+
status += "- Check the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for warnings or errors.<br/>";
|
328 |
+
status += "- Check the web server and PHP error logs. <br/>";
|
329 |
+
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step2deploy_timout#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
|
330 |
+
$('#ajaxerr-data').html(status);
|
331 |
+
DUPX.hideProgressBar();
|
332 |
+
}
|
333 |
+
});
|
334 |
+
|
335 |
+
}
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Toggles the cpanel Login area */
|
339 |
+
DUPX.togglePanels = function (pane)
|
340 |
+
{
|
341 |
+
$('#s2-basic-pane, #s2-cpnl-pane').hide();
|
342 |
+
$('#s2-basic-btn, #s2-cpnl-btn').removeClass('active in-active');
|
343 |
+
if (pane == 'basic') {
|
344 |
+
$('#s2-basic-pane').show();
|
345 |
+
$('#s2-basic-btn').addClass('active');
|
346 |
+
$('#s2-cpnl-btn').addClass('in-active');
|
347 |
+
} else {
|
348 |
+
$('#s2-cpnl-pane').show(200);
|
349 |
+
$('#s2-cpnl-btn').addClass('active');
|
350 |
+
$('#s2-basic-btn').addClass('in-active');
|
351 |
+
}
|
352 |
+
}
|
353 |
+
|
354 |
+
|
355 |
+
/** Go back on AJAX result view */
|
356 |
+
DUPX.hideErrorResult = function()
|
357 |
+
{
|
358 |
+
$('#s2-result-form').hide();
|
359 |
+
$('#s2-input-form').show(200);
|
360 |
+
}
|
361 |
+
|
362 |
+
|
363 |
+
/** Shows results of database connection
|
364 |
+
* Timeout (45000 = 45 secs) */
|
365 |
+
DUPX.testDatabase = function ()
|
366 |
+
{
|
367 |
+
$.ajax({
|
368 |
+
type: "POST",
|
369 |
+
timeout: 45000,
|
370 |
+
url: window.location.href + '?' + 'dbtest=1',
|
371 |
+
data: $('#s2-input-form').serialize(),
|
372 |
+
success: function(data){ $('#s2-dbconn-test-msg').html(data); },
|
373 |
+
error: function(data){ alert('An error occurred while testing the database connection! Contact your server admin to make sure the connection inputs are correct!'); }
|
374 |
+
});
|
375 |
+
|
376 |
+
$('#s2-dbconn-test-msg').html("Attempting Connection. Please wait...");
|
377 |
+
$("#s2-dbconn-status").show(100);
|
378 |
+
|
379 |
+
}
|
380 |
+
|
381 |
+
|
382 |
+
DUPX.showDeleteWarning = function ()
|
383 |
+
{
|
384 |
+
($('#dbaction').val() == 'empty')
|
385 |
+
? $('#s2-warning-emptydb').show(200)
|
386 |
+
: $('#s2-warning-emptydb').hide(200);
|
387 |
+
}
|
388 |
+
|
389 |
+
|
390 |
+
DUPX.togglePort = function ()
|
391 |
+
{
|
392 |
+
$('#s2-dbport-btn').hide();
|
393 |
+
$('#dbport').show();
|
394 |
+
}
|
395 |
+
|
396 |
+
|
397 |
+
//DOCUMENT LOAD
|
398 |
+
$(document).ready(function()
|
399 |
+
{
|
400 |
+
$('#dup-s2-dialog-data').appendTo('#dup-s2-result-container');
|
401 |
+
$("select#dbaction").click(DUPX.showDeleteWarning);
|
402 |
+
DUPX.showDeleteWarning();
|
403 |
+
|
404 |
+
//MySQL Mode
|
405 |
+
$("input[name=dbmysqlmode]").click(function() {
|
406 |
+
if ($(this).val() == 'CUSTOM') {
|
407 |
+
$('#dbmysqlmode_3_view').show();
|
408 |
+
} else {
|
409 |
+
$('#dbmysqlmode_3_view').hide();
|
410 |
+
}
|
411 |
+
});
|
412 |
+
|
413 |
+
if ($("input[name=dbmysqlmode]:checked").val() == 'CUSTOM') {
|
414 |
+
$('#dbmysqlmode_3_view').show();
|
415 |
+
}
|
416 |
+
$("*[data-type='toggle']").click(DUPX.toggleClick);
|
417 |
+
});
|
418 |
+
</script>
|
installer/build/view.step3.php
CHANGED
@@ -1,333 +1,333 @@
|
|
1 |
-
<?php
|
2 |
-
$dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport']);
|
3 |
-
|
4 |
-
$all_tables = DUPX_DB::getTables($dbh);
|
5 |
-
$active_plugins = DUPX_U::getActivePlugins($dbh);
|
6 |
-
|
7 |
-
$old_path = $GLOBALS['FW_WPROOT'];
|
8 |
-
$new_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
|
9 |
-
$new_path = ((strrpos($old_path, '/') + 1) == strlen($old_path)) ? DUPX_U::addSlash($new_path) : $new_path;
|
10 |
-
?>
|
11 |
-
|
12 |
-
|
13 |
-
<!-- =========================================
|
14 |
-
VIEW: STEP 3- INPUT -->
|
15 |
-
<form id='s3-input-form' method="post" class="content-form">
|
16 |
-
|
17 |
-
<!-- POST PARAMS -->
|
18 |
-
<input type="hidden" name="action_ajax" value="3" />
|
19 |
-
<input type="hidden" name="action_step" value="3" />
|
20 |
-
<input type="hidden" name="logging" value="<?php echo $_POST['logging'] ?>" />
|
21 |
-
<input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
|
22 |
-
<input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
|
23 |
-
<input type="hidden" name="json" value="<?php echo $_POST['json']; ?>" />
|
24 |
-
<input type="hidden" name="dbhost" value="<?php echo $_POST['dbhost'] ?>" />
|
25 |
-
<input type="hidden" name="dbport" value="<?php echo $_POST['dbport'] ?>" />
|
26 |
-
<input type="hidden" name="dbuser" value="<?php echo $_POST['dbuser'] ?>" />
|
27 |
-
<input type="hidden" name="dbpass" value="<?php echo htmlentities($_POST['dbpass']) ?>" />
|
28 |
-
<input type="hidden" name="dbname" value="<?php echo $_POST['dbname'] ?>" />
|
29 |
-
<input type="hidden" name="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" />
|
30 |
-
<input type="hidden" name="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" />
|
31 |
-
|
32 |
-
<div class="dupx-logfile-link"><a href="installer-log.txt?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">installer-log.txt</a></div>
|
33 |
-
<div class="hdr-main">
|
34 |
-
Step <span class="step">3</span> of 4: Update Data
|
35 |
-
</div>
|
36 |
-
|
37 |
-
<!-- ====================================
|
38 |
-
NEW SETTINGS
|
39 |
-
==================================== -->
|
40 |
-
<div class="hdr-sub1" style="margin-top:8px" data-type="toggle" data-target="#s3-new-settings">
|
41 |
-
<a href="javascript:void(0)"><i class="dupx-minus-square"></i> New Settings</a>
|
42 |
-
</div>
|
43 |
-
<div id='s3-new-settings'>
|
44 |
-
<table class="s3-table-inputs">
|
45 |
-
<tr>
|
46 |
-
<td style="width:80px">URL:</td>
|
47 |
-
<td>
|
48 |
-
<input type="text" name="url_new" id="url_new" value="" />
|
49 |
-
<a href="javascript:DUPX.getNewURL('url_new')" style="font-size:12px">get</a>
|
50 |
-
</td>
|
51 |
-
</tr>
|
52 |
-
<tr>
|
53 |
-
<td>Path:</td>
|
54 |
-
<td><input type="text" name="path_new" id="path_new" value="<?php echo $new_path ?>" /></td>
|
55 |
-
</tr>
|
56 |
-
<tr>
|
57 |
-
<td>Title:</td>
|
58 |
-
<td><input type="text" name="blogname" id="blogname" value="<?php echo $GLOBALS['FW_BLOGNAME'] ?>" /></td>
|
59 |
-
</tr>
|
60 |
-
</table>
|
61 |
-
</div>
|
62 |
-
<br/><br/>
|
63 |
-
|
64 |
-
<!-- ====================================
|
65 |
-
OPTIONS
|
66 |
-
==================================== -->
|
67 |
-
<div class="hdr-sub1" data-type="toggle" data-target="#s3-adv-opts">
|
68 |
-
<a href="javascript:void(0)"><i class="dupx-plus-square"></i> Options</a>
|
69 |
-
</div>
|
70 |
-
<div id='s3-adv-opts' style="display:none;">
|
71 |
-
<div class="help-target"><a href="?help#help-s3" target="_blank">[help]</a></div>
|
72 |
-
<br/>
|
73 |
-
|
74 |
-
<div class="hdr-sub3">New Admin Account</div>
|
75 |
-
<div style="text-align: center; margin-top:7px">
|
76 |
-
<i style="color:gray;font-size: 11px">This feature is optional. If the username already exists the account will NOT be created or updated.</i>
|
77 |
-
</div>
|
78 |
-
<table class="s3-table-inputs">
|
79 |
-
<tr>
|
80 |
-
<td>Username:</td>
|
81 |
-
<td><input type="text" name="wp_username" id="wp_username" value="" title="4 characters minimum" placeholder="(4 or more characters)" /></td>
|
82 |
-
</tr>
|
83 |
-
<tr>
|
84 |
-
<td valign="top">Password:</td>
|
85 |
-
<td><input type="text" name="wp_password" id="wp_password" value="" title="6 characters minimum" placeholder="(6 or more characters)" /></td>
|
86 |
-
</tr>
|
87 |
-
</table>
|
88 |
-
<br/><br/>
|
89 |
-
|
90 |
-
<div class="hdr-sub3">Scan Options</div>
|
91 |
-
<table class="s3-table-inputs">
|
92 |
-
<tr>
|
93 |
-
<td>Site URL:</td>
|
94 |
-
<td>
|
95 |
-
<input type="text" name="siteurl" id="siteurl" value="" />
|
96 |
-
<a href="javascript:DUPX.getNewURL('siteurl')" style="font-size:12px">get</a><br/>
|
97 |
-
</td>
|
98 |
-
</tr>
|
99 |
-
<tr>
|
100 |
-
<td>Old URL:</td>
|
101 |
-
<td>
|
102 |
-
<input type="text" name="url_old" id="url_old" value="<?php echo $GLOBALS['FW_URL_OLD'] ?>" readonly="readonly" class="readonly" />
|
103 |
-
<a href="javascript:DUPX.editOldURL()" id="edit_url_old" style="font-size:12px">edit</a>
|
104 |
-
</td>
|
105 |
-
</tr>
|
106 |
-
<tr>
|
107 |
-
<td>Old Path:</td>
|
108 |
-
<td>
|
109 |
-
<input type="text" name="path_old" id="path_old" value="<?php echo $old_path ?>" readonly="readonly" class="readonly" />
|
110 |
-
<a href="javascript:DUPX.editOldPath()" id="edit_path_old" style="font-size:12px">edit</a>
|
111 |
-
</td>
|
112 |
-
</tr>
|
113 |
-
</table><br/>
|
114 |
-
|
115 |
-
<table>
|
116 |
-
<tr>
|
117 |
-
<td style="padding-right:10px">
|
118 |
-
<b>Scan Tables:</b>
|
119 |
-
<div class="s3-allnonelinks">
|
120 |
-
<a href="javascript:void(0)" onclick="$('#tables option').prop('selected',true);">[All]</a>
|
121 |
-
<a href="javascript:void(0)" onclick="$('#tables option').prop('selected',false);">[None]</a>
|
122 |
-
</div><br style="clear:both" />
|
123 |
-
<select id="tables" name="tables[]" multiple="multiple" style="width:315px; height:100px">
|
124 |
-
<?php
|
125 |
-
foreach( $all_tables as $table ) {
|
126 |
-
echo '<option selected="selected" value="' . DUPX_U::escapeHTML( $table ) . '">' . $table . '</option>';
|
127 |
-
}
|
128 |
-
?>
|
129 |
-
</select>
|
130 |
-
|
131 |
-
</td>
|
132 |
-
<td valign="top">
|
133 |
-
<b>Activate Plugins:</b>
|
134 |
-
<div class="s3-allnonelinks">
|
135 |
-
<a href="javascript:void(0)" onclick="$('#plugins option').prop('selected',true);">[All]</a>
|
136 |
-
<a href="javascript:void(0)" onclick="$('#plugins option').prop('selected',false);">[None]</a>
|
137 |
-
</div><br style="clear:both" />
|
138 |
-
<select id="plugins" name="plugins[]" multiple="multiple" style="width:315px; height:100px">
|
139 |
-
<?php
|
140 |
-
foreach ($active_plugins as $plugin) {
|
141 |
-
echo '<option selected="selected" value="' . DUPX_U::escapeHTML( $plugin ) . '">' . dirname($plugin) . '</option>';
|
142 |
-
}
|
143 |
-
?>
|
144 |
-
</select>
|
145 |
-
</td>
|
146 |
-
</tr>
|
147 |
-
</table>
|
148 |
-
<br/>
|
149 |
-
|
150 |
-
<input type="checkbox" name="fullsearch" id="fullsearch" value="1" /> <label for="fullsearch">Use Database Full Search Mode </label><br/>
|
151 |
-
<input type="checkbox" name="postguid" id="postguid" value="1" /> <label for="postguid">Keep Post GUID Unchanged</label><br/>
|
152 |
-
<br/><br/>
|
153 |
-
|
154 |
-
<!-- WP-CONFIG -->
|
155 |
-
<div class="hdr-sub3">WP-Config File</div>
|
156 |
-
<table class="dupx-opts dupx-advopts">
|
157 |
-
<tr>
|
158 |
-
<td>Cache:</td>
|
159 |
-
<td style="width:125px"><input type="checkbox" name="cache_wp" id="cache_wp" /> <label for="cache_wp">Keep Enabled</label></td>
|
160 |
-
<td><input type="checkbox" name="cache_path" id="cache_path" /> <label for="cache_path">Keep Home Path</label></td>
|
161 |
-
</tr>
|
162 |
-
<tr>
|
163 |
-
<td>SSL:</td>
|
164 |
-
<td><input type="checkbox" name="ssl_admin" id="ssl_admin" /> <label for="ssl_admin">Enforce on Admin</label></td>
|
165 |
-
<td></td>
|
166 |
-
</tr>
|
167 |
-
</table>
|
168 |
-
<br/><br/><br/>
|
169 |
-
<br/><br/>
|
170 |
-
</div>
|
171 |
-
|
172 |
-
<div class="dupx-footer-buttons">
|
173 |
-
<input id="dup-step3-next" class="default-btn" type="button" value=" Next " onclick="DUPX.runUpdate()" />
|
174 |
-
</div>
|
175 |
-
</form>
|
176 |
-
|
177 |
-
|
178 |
-
<!-- =========================================
|
179 |
-
VIEW: STEP 3 - AJAX RESULT
|
180 |
-
========================================= -->
|
181 |
-
<form id='s3-result-form' method="post" class="content-form" style="display:none">
|
182 |
-
|
183 |
-
<div class="dupx-logfile-link"><a href="installer-log.txt" target="install_log">installer-log.txt</a></div>
|
184 |
-
<div class="hdr-main">
|
185 |
-
Step <span class="step">3</span> of 4: Update Data
|
186 |
-
</div>
|
187 |
-
|
188 |
-
<!-- POST PARAMS -->
|
189 |
-
<div class="dupx-debug">
|
190 |
-
<input type="hidden" name="action_step" value="4" />
|
191 |
-
<input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
|
192 |
-
<input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
|
193 |
-
<input type="hidden" name="url_new" id="ajax-url_new" />
|
194 |
-
<input type="hidden" name="json" id="ajax-json" />
|
195 |
-
<br/>
|
196 |
-
<input type='submit' value='manual submit'>
|
197 |
-
</div>
|
198 |
-
|
199 |
-
<!-- PROGRESS BAR -->
|
200 |
-
<div id="progress-area">
|
201 |
-
<div style="width:500px; margin:auto">
|
202 |
-
<h3>Updating Data Replacements Please Wait...</h3>
|
203 |
-
<div id="progress-bar"></div>
|
204 |
-
<i>This may take several minutes</i>
|
205 |
-
</div>
|
206 |
-
</div>
|
207 |
-
|
208 |
-
<!-- AJAX SYSTEM ERROR -->
|
209 |
-
<div id="ajaxerr-area" style="display:none">
|
210 |
-
<p>Please try again an issue has occurred.</p>
|
211 |
-
<div style="padding: 0px 10px 10px 10px;">
|
212 |
-
<div id="ajaxerr-data">An unknown issue has occurred with the update data
|
213 |
-
<div style="text-align:center; margin:10px auto 0px auto">
|
214 |
-
<input type="button" class="default-btn" onclick='DUPX.hideErrorResult2()' value="« Try Again" /><br/><br/>
|
215 |
-
<i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket' target='_blank'>snapcreek.com</a></i>
|
216 |
-
</div>
|
217 |
-
</div>
|
218 |
-
</div>
|
219 |
-
</form>
|
220 |
-
|
221 |
-
<script>
|
222 |
-
/**
|
223 |
-
* Timeout (10000000 = 166 minutes) */
|
224 |
-
DUPX.runUpdate = function()
|
225 |
-
{
|
226 |
-
//Validation
|
227 |
-
var wp_username = $.trim($("#wp_username").val()).length || 0;
|
228 |
-
var wp_password = $.trim($("#wp_password").val()).length || 0;
|
229 |
-
|
230 |
-
if ( $.trim($("#url_new").val()) == "" ) {alert("The 'New URL' field is required!"); return false;}
|
231 |
-
if ( $.trim($("#siteurl").val()) == "" ) {alert("The 'Site URL' field is required!"); return false;}
|
232 |
-
if (wp_username >= 1 && wp_username < 4) {alert("The New Admin Account 'Username' must be four or more characters"); return false;}
|
233 |
-
if (wp_username >= 4 && wp_password < 6) {alert("The New Admin Account 'Password' must be six or more characters"); return false;}
|
234 |
-
|
235 |
-
$.ajax({
|
236 |
-
type: "POST",
|
237 |
-
timeout: 1800000,
|
238 |
-
dataType: "json",
|
239 |
-
url: window.location.href,
|
240 |
-
data: $('#s3-input-form').serialize(),
|
241 |
-
beforeSend: function() {
|
242 |
-
DUPX.showProgressBar();
|
243 |
-
$('#s3-input-form').hide();
|
244 |
-
$('#s3-result-form').show();
|
245 |
-
},
|
246 |
-
success: function(data){
|
247 |
-
if (typeof(data) != 'undefined' && data.step3.pass == 1) {
|
248 |
-
$("#ajax-url_new").val($("#url_new").val());
|
249 |
-
$("#ajax-json").val(escape(JSON.stringify(data)));
|
250 |
-
<?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
|
251 |
-
setTimeout(function(){$('#s3-result-form').submit();}, 500);
|
252 |
-
<?php endif; ?>
|
253 |
-
$('#progress-area').fadeOut(1000);
|
254 |
-
} else {
|
255 |
-
DUPX.hideProgressBar();
|
256 |
-
}
|
257 |
-
},
|
258 |
-
error: function(xhr) {
|
259 |
-
var status = "<b>Server Code:</b> " + xhr.status + "<br/>";
|
260 |
-
status += "<b>Status:</b> " + xhr.statusText + "<br/>";
|
261 |
-
status += "<b>Response:</b> " + xhr.responseText + "";
|
262 |
-
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
263 |
-
status += "- Check the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for warnings or errors.<br/>";
|
264 |
-
status += "- Check the web server and PHP error logs. <br/>";
|
265 |
-
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech
|
266 |
-
$('#ajaxerr-data').html(status);
|
267 |
-
DUPX.hideProgressBar();
|
268 |
-
}
|
269 |
-
});
|
270 |
-
}
|
271 |
-
|
272 |
-
/** Returns the windows active url */
|
273 |
-
DUPX.getNewURL = function(id)
|
274 |
-
{
|
275 |
-
var filename= window.location.pathname.split('/').pop() || 'installer.php' ;
|
276 |
-
var path = window.location.href.replace(filename, '').replace(/\/$/, '');
|
277 |
-
$("#" + id).val(path);
|
278 |
-
}
|
279 |
-
|
280 |
-
/** Allows user to edit the package url */
|
281 |
-
DUPX.editOldURL = function()
|
282 |
-
{
|
283 |
-
var msg = 'This is the URL that was generated when the package was created.\n';
|
284 |
-
msg += 'Changing this value may cause issues with the install process.\n\n';
|
285 |
-
msg += 'Only modify this value if you know exactly what the value should be.\n';
|
286 |
-
msg += 'See "General Settings" in the WordPress Administrator for more details.\n\n';
|
287 |
-
msg += 'Are you sure you want to continue?';
|
288 |
-
|
289 |
-
if (confirm(msg)) {
|
290 |
-
$("#url_old").removeAttr('readonly');
|
291 |
-
$("#url_old").removeClass('readonly');
|
292 |
-
$('#edit_url_old').hide('slow');
|
293 |
-
}
|
294 |
-
}
|
295 |
-
|
296 |
-
/** Allows user to edit the package path */
|
297 |
-
DUPX.editOldPath = function()
|
298 |
-
{
|
299 |
-
var msg = 'This is the SERVER URL that was generated when the package was created.\n';
|
300 |
-
msg += 'Changing this value may cause issues with the install process.\n\n';
|
301 |
-
msg += 'Only modify this value if you know exactly what the value should be.\n';
|
302 |
-
msg += 'Are you sure you want to continue?';
|
303 |
-
|
304 |
-
if (confirm(msg)) {
|
305 |
-
$("#path_old").removeAttr('readonly');
|
306 |
-
$("#path_old").removeClass('readonly');
|
307 |
-
$('#edit_path_old').hide('slow');
|
308 |
-
}
|
309 |
-
}
|
310 |
-
|
311 |
-
/** Go back on AJAX result view */
|
312 |
-
DUPX.hideErrorResult2 = function()
|
313 |
-
{
|
314 |
-
$('#s3-result-form').hide();
|
315 |
-
$('#s3-input-form').show(200);
|
316 |
-
}
|
317 |
-
|
318 |
-
//DOCUMENT LOAD
|
319 |
-
$(document).ready(function()
|
320 |
-
{
|
321 |
-
DUPX.getNewURL('url_new');
|
322 |
-
DUPX.getNewURL('siteurl');
|
323 |
-
$("*[data-type='toggle']").click(DUPX.toggleClick);
|
324 |
-
$("#wp_password").passStrength({
|
325 |
-
shortPass: "top_shortPass",
|
326 |
-
badPass: "top_badPass",
|
327 |
-
goodPass: "top_goodPass",
|
328 |
-
strongPass: "top_strongPass",
|
329 |
-
baseStyle: "top_testresult",
|
330 |
-
userid: "#wp_username",
|
331 |
-
messageloc: 1 });
|
332 |
-
});
|
333 |
</script>
|
1 |
+
<?php
|
2 |
+
$dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport']);
|
3 |
+
|
4 |
+
$all_tables = DUPX_DB::getTables($dbh);
|
5 |
+
$active_plugins = DUPX_U::getActivePlugins($dbh);
|
6 |
+
|
7 |
+
$old_path = $GLOBALS['FW_WPROOT'];
|
8 |
+
$new_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
|
9 |
+
$new_path = ((strrpos($old_path, '/') + 1) == strlen($old_path)) ? DUPX_U::addSlash($new_path) : $new_path;
|
10 |
+
?>
|
11 |
+
|
12 |
+
|
13 |
+
<!-- =========================================
|
14 |
+
VIEW: STEP 3- INPUT -->
|
15 |
+
<form id='s3-input-form' method="post" class="content-form">
|
16 |
+
|
17 |
+
<!-- POST PARAMS -->
|
18 |
+
<input type="hidden" name="action_ajax" value="3" />
|
19 |
+
<input type="hidden" name="action_step" value="3" />
|
20 |
+
<input type="hidden" name="logging" value="<?php echo $_POST['logging'] ?>" />
|
21 |
+
<input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
|
22 |
+
<input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
|
23 |
+
<input type="hidden" name="json" value="<?php echo $_POST['json']; ?>" />
|
24 |
+
<input type="hidden" name="dbhost" value="<?php echo $_POST['dbhost'] ?>" />
|
25 |
+
<input type="hidden" name="dbport" value="<?php echo $_POST['dbport'] ?>" />
|
26 |
+
<input type="hidden" name="dbuser" value="<?php echo $_POST['dbuser'] ?>" />
|
27 |
+
<input type="hidden" name="dbpass" value="<?php echo htmlentities($_POST['dbpass']) ?>" />
|
28 |
+
<input type="hidden" name="dbname" value="<?php echo $_POST['dbname'] ?>" />
|
29 |
+
<input type="hidden" name="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" />
|
30 |
+
<input type="hidden" name="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" />
|
31 |
+
|
32 |
+
<div class="dupx-logfile-link"><a href="installer-log.txt?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">installer-log.txt</a></div>
|
33 |
+
<div class="hdr-main">
|
34 |
+
Step <span class="step">3</span> of 4: Update Data
|
35 |
+
</div>
|
36 |
+
|
37 |
+
<!-- ====================================
|
38 |
+
NEW SETTINGS
|
39 |
+
==================================== -->
|
40 |
+
<div class="hdr-sub1" style="margin-top:8px" data-type="toggle" data-target="#s3-new-settings">
|
41 |
+
<a href="javascript:void(0)"><i class="dupx-minus-square"></i> New Settings</a>
|
42 |
+
</div>
|
43 |
+
<div id='s3-new-settings'>
|
44 |
+
<table class="s3-table-inputs">
|
45 |
+
<tr>
|
46 |
+
<td style="width:80px">URL:</td>
|
47 |
+
<td>
|
48 |
+
<input type="text" name="url_new" id="url_new" value="" />
|
49 |
+
<a href="javascript:DUPX.getNewURL('url_new')" style="font-size:12px">get</a>
|
50 |
+
</td>
|
51 |
+
</tr>
|
52 |
+
<tr>
|
53 |
+
<td>Path:</td>
|
54 |
+
<td><input type="text" name="path_new" id="path_new" value="<?php echo $new_path ?>" /></td>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<td>Title:</td>
|
58 |
+
<td><input type="text" name="blogname" id="blogname" value="<?php echo $GLOBALS['FW_BLOGNAME'] ?>" /></td>
|
59 |
+
</tr>
|
60 |
+
</table>
|
61 |
+
</div>
|
62 |
+
<br/><br/>
|
63 |
+
|
64 |
+
<!-- ====================================
|
65 |
+
OPTIONS
|
66 |
+
==================================== -->
|
67 |
+
<div class="hdr-sub1" data-type="toggle" data-target="#s3-adv-opts">
|
68 |
+
<a href="javascript:void(0)"><i class="dupx-plus-square"></i> Options</a>
|
69 |
+
</div>
|
70 |
+
<div id='s3-adv-opts' style="display:none;">
|
71 |
+
<div class="help-target"><a href="?help#help-s3" target="_blank">[help]</a></div>
|
72 |
+
<br/>
|
73 |
+
|
74 |
+
<div class="hdr-sub3">New Admin Account</div>
|
75 |
+
<div style="text-align: center; margin-top:7px">
|
76 |
+
<i style="color:gray;font-size: 11px">This feature is optional. If the username already exists the account will NOT be created or updated.</i>
|
77 |
+
</div>
|
78 |
+
<table class="s3-table-inputs">
|
79 |
+
<tr>
|
80 |
+
<td>Username:</td>
|
81 |
+
<td><input type="text" name="wp_username" id="wp_username" value="" title="4 characters minimum" placeholder="(4 or more characters)" /></td>
|
82 |
+
</tr>
|
83 |
+
<tr>
|
84 |
+
<td valign="top">Password:</td>
|
85 |
+
<td><input type="text" name="wp_password" id="wp_password" value="" title="6 characters minimum" placeholder="(6 or more characters)" /></td>
|
86 |
+
</tr>
|
87 |
+
</table>
|
88 |
+
<br/><br/>
|
89 |
+
|
90 |
+
<div class="hdr-sub3">Scan Options</div>
|
91 |
+
<table class="s3-table-inputs">
|
92 |
+
<tr>
|
93 |
+
<td>Site URL:</td>
|
94 |
+
<td>
|
95 |
+
<input type="text" name="siteurl" id="siteurl" value="" />
|
96 |
+
<a href="javascript:DUPX.getNewURL('siteurl')" style="font-size:12px">get</a><br/>
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
<tr>
|
100 |
+
<td>Old URL:</td>
|
101 |
+
<td>
|
102 |
+
<input type="text" name="url_old" id="url_old" value="<?php echo $GLOBALS['FW_URL_OLD'] ?>" readonly="readonly" class="readonly" />
|
103 |
+
<a href="javascript:DUPX.editOldURL()" id="edit_url_old" style="font-size:12px">edit</a>
|
104 |
+
</td>
|
105 |
+
</tr>
|
106 |
+
<tr>
|
107 |
+
<td>Old Path:</td>
|
108 |
+
<td>
|
109 |
+
<input type="text" name="path_old" id="path_old" value="<?php echo $old_path ?>" readonly="readonly" class="readonly" />
|
110 |
+
<a href="javascript:DUPX.editOldPath()" id="edit_path_old" style="font-size:12px">edit</a>
|
111 |
+
</td>
|
112 |
+
</tr>
|
113 |
+
</table><br/>
|
114 |
+
|
115 |
+
<table>
|
116 |
+
<tr>
|
117 |
+
<td style="padding-right:10px">
|
118 |
+
<b>Scan Tables:</b>
|
119 |
+
<div class="s3-allnonelinks">
|
120 |
+
<a href="javascript:void(0)" onclick="$('#tables option').prop('selected',true);">[All]</a>
|
121 |
+
<a href="javascript:void(0)" onclick="$('#tables option').prop('selected',false);">[None]</a>
|
122 |
+
</div><br style="clear:both" />
|
123 |
+
<select id="tables" name="tables[]" multiple="multiple" style="width:315px; height:100px">
|
124 |
+
<?php
|
125 |
+
foreach( $all_tables as $table ) {
|
126 |
+
echo '<option selected="selected" value="' . DUPX_U::escapeHTML( $table ) . '">' . $table . '</option>';
|
127 |
+
}
|
128 |
+
?>
|
129 |
+
</select>
|
130 |
+
|
131 |
+
</td>
|
132 |
+
<td valign="top">
|
133 |
+
<b>Activate Plugins:</b>
|
134 |
+
<div class="s3-allnonelinks">
|
135 |
+
<a href="javascript:void(0)" onclick="$('#plugins option').prop('selected',true);">[All]</a>
|
136 |
+
<a href="javascript:void(0)" onclick="$('#plugins option').prop('selected',false);">[None]</a>
|
137 |
+
</div><br style="clear:both" />
|
138 |
+
<select id="plugins" name="plugins[]" multiple="multiple" style="width:315px; height:100px">
|
139 |
+
<?php
|
140 |
+
foreach ($active_plugins as $plugin) {
|
141 |
+
echo '<option selected="selected" value="' . DUPX_U::escapeHTML( $plugin ) . '">' . dirname($plugin) . '</option>';
|
142 |
+
}
|
143 |
+
?>
|
144 |
+
</select>
|
145 |
+
</td>
|
146 |
+
</tr>
|
147 |
+
</table>
|
148 |
+
<br/>
|
149 |
+
|
150 |
+
<input type="checkbox" name="fullsearch" id="fullsearch" value="1" /> <label for="fullsearch">Use Database Full Search Mode </label><br/>
|
151 |
+
<input type="checkbox" name="postguid" id="postguid" value="1" /> <label for="postguid">Keep Post GUID Unchanged</label><br/>
|
152 |
+
<br/><br/>
|
153 |
+
|
154 |
+
<!-- WP-CONFIG -->
|
155 |
+
<div class="hdr-sub3">WP-Config File</div>
|
156 |
+
<table class="dupx-opts dupx-advopts">
|
157 |
+
<tr>
|
158 |
+
<td>Cache:</td>
|
159 |
+
<td style="width:125px"><input type="checkbox" name="cache_wp" id="cache_wp" /> <label for="cache_wp">Keep Enabled</label></td>
|
160 |
+
<td><input type="checkbox" name="cache_path" id="cache_path" /> <label for="cache_path">Keep Home Path</label></td>
|
161 |
+
</tr>
|
162 |
+
<tr>
|
163 |
+
<td>SSL:</td>
|
164 |
+
<td><input type="checkbox" name="ssl_admin" id="ssl_admin" /> <label for="ssl_admin">Enforce on Admin</label></td>
|
165 |
+
<td></td>
|
166 |
+
</tr>
|
167 |
+
</table>
|
168 |
+
<br/><br/><br/>
|
169 |
+
<br/><br/>
|
170 |
+
</div>
|
171 |
+
|
172 |
+
<div class="dupx-footer-buttons">
|
173 |
+
<input id="dup-step3-next" class="default-btn" type="button" value=" Next " onclick="DUPX.runUpdate()" />
|
174 |
+
</div>
|
175 |
+
</form>
|
176 |
+
|
177 |
+
|
178 |
+
<!-- =========================================
|
179 |
+
VIEW: STEP 3 - AJAX RESULT
|
180 |
+
========================================= -->
|
181 |
+
<form id='s3-result-form' method="post" class="content-form" style="display:none">
|
182 |
+
|
183 |
+
<div class="dupx-logfile-link"><a href="installer-log.txt" target="install_log">installer-log.txt</a></div>
|
184 |
+
<div class="hdr-main">
|
185 |
+
Step <span class="step">3</span> of 4: Update Data
|
186 |
+
</div>
|
187 |
+
|
188 |
+
<!-- POST PARAMS -->
|
189 |
+
<div class="dupx-debug">
|
190 |
+
<input type="hidden" name="action_step" value="4" />
|
191 |
+
<input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
|
192 |
+
<input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
|
193 |
+
<input type="hidden" name="url_new" id="ajax-url_new" />
|
194 |
+
<input type="hidden" name="json" id="ajax-json" />
|
195 |
+
<br/>
|
196 |
+
<input type='submit' value='manual submit'>
|
197 |
+
</div>
|
198 |
+
|
199 |
+
<!-- PROGRESS BAR -->
|
200 |
+
<div id="progress-area">
|
201 |
+
<div style="width:500px; margin:auto">
|
202 |
+
<h3>Updating Data Replacements Please Wait...</h3>
|
203 |
+
<div id="progress-bar"></div>
|
204 |
+
<i>This may take several minutes</i>
|
205 |
+
</div>
|
206 |
+
</div>
|
207 |
+
|
208 |
+
<!-- AJAX SYSTEM ERROR -->
|
209 |
+
<div id="ajaxerr-area" style="display:none">
|
210 |
+
<p>Please try again an issue has occurred.</p>
|
211 |
+
<div style="padding: 0px 10px 10px 10px;">
|
212 |
+
<div id="ajaxerr-data">An unknown issue has occurred with the update data set up process. Please see the installer-log.txt file for more details.</div>
|
213 |
+
<div style="text-align:center; margin:10px auto 0px auto">
|
214 |
+
<input type="button" class="default-btn" onclick='DUPX.hideErrorResult2()' value="« Try Again" /><br/><br/>
|
215 |
+
<i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step3_ajax' target='_blank'>snapcreek.com</a></i>
|
216 |
+
</div>
|
217 |
+
</div>
|
218 |
+
</div>
|
219 |
+
</form>
|
220 |
+
|
221 |
+
<script>
|
222 |
+
/**
|
223 |
+
* Timeout (10000000 = 166 minutes) */
|
224 |
+
DUPX.runUpdate = function()
|
225 |
+
{
|
226 |
+
//Validation
|
227 |
+
var wp_username = $.trim($("#wp_username").val()).length || 0;
|
228 |
+
var wp_password = $.trim($("#wp_password").val()).length || 0;
|
229 |
+
|
230 |
+
if ( $.trim($("#url_new").val()) == "" ) {alert("The 'New URL' field is required!"); return false;}
|
231 |
+
if ( $.trim($("#siteurl").val()) == "" ) {alert("The 'Site URL' field is required!"); return false;}
|
232 |
+
if (wp_username >= 1 && wp_username < 4) {alert("The New Admin Account 'Username' must be four or more characters"); return false;}
|
233 |
+
if (wp_username >= 4 && wp_password < 6) {alert("The New Admin Account 'Password' must be six or more characters"); return false;}
|
234 |
+
|
235 |
+
$.ajax({
|
236 |
+
type: "POST",
|
237 |
+
timeout: 1800000,
|
238 |
+
dataType: "json",
|
239 |
+
url: window.location.href,
|
240 |
+
data: $('#s3-input-form').serialize(),
|
241 |
+
beforeSend: function() {
|
242 |
+
DUPX.showProgressBar();
|
243 |
+
$('#s3-input-form').hide();
|
244 |
+
$('#s3-result-form').show();
|
245 |
+
},
|
246 |
+
success: function(data){
|
247 |
+
if (typeof(data) != 'undefined' && data.step3.pass == 1) {
|
248 |
+
$("#ajax-url_new").val($("#url_new").val());
|
249 |
+
$("#ajax-json").val(escape(JSON.stringify(data)));
|
250 |
+
<?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
|
251 |
+
setTimeout(function(){$('#s3-result-form').submit();}, 500);
|
252 |
+
<?php endif; ?>
|
253 |
+
$('#progress-area').fadeOut(1000);
|
254 |
+
} else {
|
255 |
+
DUPX.hideProgressBar();
|
256 |
+
}
|
257 |
+
},
|
258 |
+
error: function(xhr) {
|
259 |
+
var status = "<b>Server Code:</b> " + xhr.status + "<br/>";
|
260 |
+
status += "<b>Status:</b> " + xhr.statusText + "<br/>";
|
261 |
+
status += "<b>Response:</b> " + xhr.responseText + "";
|
262 |
+
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
263 |
+
status += "- Check the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for warnings or errors.<br/>";
|
264 |
+
status += "- Check the web server and PHP error logs. <br/>";
|
265 |
+
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step3_ajax_rundepl#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
|
266 |
+
$('#ajaxerr-data').html(status);
|
267 |
+
DUPX.hideProgressBar();
|
268 |
+
}
|
269 |
+
});
|
270 |
+
}
|
271 |
+
|
272 |
+
/** Returns the windows active url */
|
273 |
+
DUPX.getNewURL = function(id)
|
274 |
+
{
|
275 |
+
var filename= window.location.pathname.split('/').pop() || 'installer.php' ;
|
276 |
+
var path = window.location.href.replace(filename, '').replace(/\/$/, '');
|
277 |
+
$("#" + id).val(path);
|
278 |
+
}
|
279 |
+
|
280 |
+
/** Allows user to edit the package url */
|
281 |
+
DUPX.editOldURL = function()
|
282 |
+
{
|
283 |
+
var msg = 'This is the URL that was generated when the package was created.\n';
|
284 |
+
msg += 'Changing this value may cause issues with the install process.\n\n';
|
285 |
+
msg += 'Only modify this value if you know exactly what the value should be.\n';
|
286 |
+
msg += 'See "General Settings" in the WordPress Administrator for more details.\n\n';
|
287 |
+
msg += 'Are you sure you want to continue?';
|
288 |
+
|
289 |
+
if (confirm(msg)) {
|
290 |
+
$("#url_old").removeAttr('readonly');
|
291 |
+
$("#url_old").removeClass('readonly');
|
292 |
+
$('#edit_url_old').hide('slow');
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
/** Allows user to edit the package path */
|
297 |
+
DUPX.editOldPath = function()
|
298 |
+
{
|
299 |
+
var msg = 'This is the SERVER URL that was generated when the package was created.\n';
|
300 |
+
msg += 'Changing this value may cause issues with the install process.\n\n';
|
301 |
+
msg += 'Only modify this value if you know exactly what the value should be.\n';
|
302 |
+
msg += 'Are you sure you want to continue?';
|
303 |
+
|
304 |
+
if (confirm(msg)) {
|
305 |
+
$("#path_old").removeAttr('readonly');
|
306 |
+
$("#path_old").removeClass('readonly');
|
307 |
+
$('#edit_path_old').hide('slow');
|
308 |
+
}
|
309 |
+
}
|
310 |
+
|
311 |
+
/** Go back on AJAX result view */
|
312 |
+
DUPX.hideErrorResult2 = function()
|
313 |
+
{
|
314 |
+
$('#s3-result-form').hide();
|
315 |
+
$('#s3-input-form').show(200);
|
316 |
+
}
|
317 |
+
|
318 |
+
//DOCUMENT LOAD
|
319 |
+
$(document).ready(function()
|
320 |
+
{
|
321 |
+
DUPX.getNewURL('url_new');
|
322 |
+
DUPX.getNewURL('siteurl');
|
323 |
+
$("*[data-type='toggle']").click(DUPX.toggleClick);
|
324 |
+
$("#wp_password").passStrength({
|
325 |
+
shortPass: "top_shortPass",
|
326 |
+
badPass: "top_badPass",
|
327 |
+
goodPass: "top_goodPass",
|
328 |
+
strongPass: "top_strongPass",
|
329 |
+
baseStyle: "top_testresult",
|
330 |
+
userid: "#wp_username",
|
331 |
+
messageloc: 1 });
|
332 |
+
});
|
333 |
</script>
|
installer/build/view.step4.php
CHANGED
@@ -127,7 +127,7 @@ VIEW: STEP 4 - INPUT -->
|
|
127 |
<ul>
|
128 |
<li>
|
129 |
<b>Unknown collation:</b> See Online FAQ:
|
130 |
-
<a href="https://snapcreek.com/duplicator/docs/faqs-tech
|
131 |
</li>
|
132 |
<li>
|
133 |
<b>Query Limits:</b> Update MySQL server with the <a href="https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html" target="_blank">max_allowed_packet</a>
|
@@ -230,7 +230,7 @@ VIEW: STEP 4 - INPUT -->
|
|
230 |
|
231 |
<div class='s4-connect'>
|
232 |
<a href="installer.php?help=1#troubleshoot" target="_blank">Troubleshoot</a> |
|
233 |
-
<a href='https://snapcreek.com/duplicator/docs/faqs-tech
|
234 |
</div><br/>
|
235 |
</form>
|
236 |
|
127 |
<ul>
|
128 |
<li>
|
129 |
<b>Unknown collation:</b> See Online FAQ:
|
130 |
+
<a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step4_unknowncoll#faq-trouble-090-q" target="_blank">What is Compatibility mode & 'Unknown collation' errors?</a>
|
131 |
</li>
|
132 |
<li>
|
133 |
<b>Query Limits:</b> Update MySQL server with the <a href="https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html" target="_blank">max_allowed_packet</a>
|
230 |
|
231 |
<div class='s4-connect'>
|
232 |
<a href="installer.php?help=1#troubleshoot" target="_blank">Troubleshoot</a> |
|
233 |
+
<a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst4_step4_troubleshoot' target='_blank'>FAQs</a>
|
234 |
</div><br/>
|
235 |
</form>
|
236 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: www.lifeinthegrid.com/partner
|
|
4 |
Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, automate, copy site
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.8
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv2
|
9 |
|
10 |
WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
|
4 |
Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, automate, copy site
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.8
|
7 |
+
Stable tag: 1.2.20
|
8 |
License: GPLv2
|
9 |
|
10 |
WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
|
views/help/gopro.php
CHANGED
@@ -109,7 +109,7 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
109 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
110 |
</tr>
|
111 |
<tr>
|
112 |
-
<td class="feature-column"><?php _e('
|
113 |
<td class="check-column"></td>
|
114 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
115 |
</tr>
|
109 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
110 |
</tr>
|
111 |
<tr>
|
112 |
+
<td class="feature-column"><?php _e('Large Package Support', 'duplicator') ?></td>
|
113 |
<td class="check-column"></td>
|
114 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
115 |
</tr>
|
views/packages/details/controller.php
CHANGED
@@ -10,8 +10,8 @@ $package = DUP_Package::getByID($package_id);
|
|
10 |
$err_found = ($package == null || $package->Status < 100);
|
11 |
$link_log = "{$package->StoreURL}{$package->NameHash}.log";
|
12 |
$err_link_log = "<a target='_blank' href='{$link_log}' >" . __('package log', 'duplicator') . '</a>';
|
13 |
-
$err_link_faq = '<a target="_blank" href="https://snapcreek.com/duplicator/docs/faqs-tech
|
14 |
-
$err_link_ticket = '<a target="_blank" href="https://snapcreek.com/duplicator/docs/faqs-tech
|
15 |
?>
|
16 |
|
17 |
<style>
|
10 |
$err_found = ($package == null || $package->Status < 100);
|
11 |
$link_log = "{$package->StoreURL}{$package->NameHash}.log";
|
12 |
$err_link_log = "<a target='_blank' href='{$link_log}' >" . __('package log', 'duplicator') . '</a>';
|
13 |
+
$err_link_faq = '<a target="_blank" href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=pkg_details_faq">' . __('FAQ', 'duplicator') . '</a>';
|
14 |
+
$err_link_ticket = '<a target="_blank" href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=pkg_details_resources#faq-resource">' . __('resources page', 'duplicator') . '</a>';
|
15 |
?>
|
16 |
|
17 |
<style>
|
views/packages/details/detail.php
CHANGED
@@ -188,10 +188,10 @@ STORAGE -->
|
|
188 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" />
|
189 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" />
|
190 |
<?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s and more storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'FTP'); ?>
|
191 |
-
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_storage_detail&utm_campaign=duplicator_pro" target="_blank"><?php _e('
|
192 |
<i class="fa fa-lightbulb-o"
|
193 |
data-tooltip-title="<?php _e('Additional Storage:', 'duplicator'); ?>"
|
194 |
-
data-tooltip="<?php _e('
|
195 |
. 'based location such as Google Drive, Amazon, Dropbox or FTP.', 'duplicator'); ?>">
|
196 |
</i>
|
197 |
</div>
|
188 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" />
|
189 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" />
|
190 |
<?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s and more storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'FTP'); ?>
|
191 |
+
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_storage_detail&utm_campaign=duplicator_pro" target="_blank"><?php _e('Duplicator Pro', 'duplicator');?></a>
|
192 |
<i class="fa fa-lightbulb-o"
|
193 |
data-tooltip-title="<?php _e('Additional Storage:', 'duplicator'); ?>"
|
194 |
+
data-tooltip="<?php _e('Duplicator Pro allows you to create a package and then store it at a custom location on this server or to a cloud '
|
195 |
. 'based location such as Google Drive, Amazon, Dropbox or FTP.', 'duplicator'); ?>">
|
196 |
</i>
|
197 |
</div>
|
views/packages/details/transfer.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
<div class="area">
|
11 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
12 |
<h2>
|
13 |
-
<?php _e('Transfer your packages to multiple<br/> locations with Duplicator
|
14 |
</h2>
|
15 |
|
16 |
<div style='text-align: left; margin:auto; width:200px'>
|
@@ -23,7 +23,7 @@
|
|
23 |
</ul>
|
24 |
</div>
|
25 |
<?php
|
26 |
-
_e('
|
27 |
?>
|
28 |
</div><br/>
|
29 |
|
10 |
<div class="area">
|
11 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
12 |
<h2>
|
13 |
+
<?php _e('Transfer your packages to multiple<br/> locations with Duplicator Pro', 'duplicator') ?>
|
14 |
</h2>
|
15 |
|
16 |
<div style='text-align: left; margin:auto; width:200px'>
|
23 |
</ul>
|
24 |
</div>
|
25 |
<?php
|
26 |
+
_e('Set up a one-time storage location and automatically <br/> push the package to your destination.', 'duplicator');
|
27 |
?>
|
28 |
</div><br/>
|
29 |
|
views/packages/main/packages.php
CHANGED
@@ -46,34 +46,38 @@
|
|
46 |
<form id="form-duplicator" method="post">
|
47 |
|
48 |
<?php
|
49 |
-
switch(rand(1,3)) {
|
50 |
-
case 1:
|
51 |
-
|
52 |
-
$feed_utm = 'have_idea';
|
53 |
-
break;
|
54 |
-
case 2:
|
55 |
-
|
56 |
-
$feed_utm = 'improve';
|
57 |
-
break;
|
58 |
-
case 3:
|
59 |
-
|
60 |
-
$feed_utm = 'feedback';
|
61 |
-
break;
|
62 |
-
}
|
|
|
|
|
63 |
?>
|
64 |
|
65 |
<div class="dup-vote">
|
66 |
<a href="javascript:void(0);" onclick="Duplicator.Pack.showFeedbackForm()">
|
67 |
-
|
68 |
</a>
|
69 |
</div>
|
70 |
|
71 |
<div id="dup-feedback-form">
|
72 |
-
|
73 |
-
<i class="fa fa-question-circle"></i> <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=
|
74 |
-
<i class="fa fa-
|
|
|
|
|
75 |
<?php if($statusCount >= 2) : ?>
|
76 |
-
|
77 |
<?php endif; ?>
|
78 |
</div>
|
79 |
|
46 |
<form id="form-duplicator" method="post">
|
47 |
|
48 |
<?php
|
49 |
+
// switch(rand(1,3)) {
|
50 |
+
// case 1:
|
51 |
+
// $feed_title = __("Have an idea?", 'duplicator');
|
52 |
+
// $feed_utm = 'have_idea';
|
53 |
+
// break;
|
54 |
+
// case 2:
|
55 |
+
// $feed_title = __("How can we improve?", 'duplicator');
|
56 |
+
// $feed_utm = 'improve';
|
57 |
+
// break;
|
58 |
+
// case 3:
|
59 |
+
// $feed_title = __("Have Feedback?", 'duplicator');
|
60 |
+
// $feed_utm = 'feedback';
|
61 |
+
// break;
|
62 |
+
// }
|
63 |
+
$feed_title = __("Need Help", 'duplicator');
|
64 |
+
$feed_utm = 'help_pack_screen';
|
65 |
?>
|
66 |
|
67 |
<div class="dup-vote">
|
68 |
<a href="javascript:void(0);" onclick="Duplicator.Pack.showFeedbackForm()">
|
69 |
+
<?php echo $feed_title; ?> <i class="fa fa-question-circle"></i>
|
70 |
</a>
|
71 |
</div>
|
72 |
|
73 |
<div id="dup-feedback-form">
|
74 |
+
<!--div style="text-align: center"><b><?php _e("LEAVE FEEDBACK", 'duplicator') ?></b></div-->
|
75 |
+
<i class="fa fa-question-circle"></i> <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=feedback_ticket_<?php echo $feed_utm; ?>&utm_campaign=duplicator_free" target="_blank"><?php _e("Need help with the plugin?", 'duplicator') ?></a> <br/>
|
76 |
+
<i class="fa fa-file-text-o"></i> <a href="https://snapcreek.com/duplicator/docs/quick-start?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=feedback_quick_<?php echo $feed_utm; ?>&utm_campaign=duplicator_free" target="_blank"><?php _e("Visit Quick Start Guide!", 'duplicator') ?></a> <br/>
|
77 |
+
<i class="fa fa-file-code-o"></i> <a href="https://snapcreek.com/duplicator/docs/faqs-tech?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=feedback_faq_<?php echo $feed_utm; ?>&utm_campaign=duplicator_free" target="_blank"><?php _e("Frequently Asked Questions!", 'duplicator') ?></a> <hr size="1"/>
|
78 |
+
<i class="fa fa-lightbulb-o"></i> <a href="https://snapcreek.com/support?idea=1&utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=feedback_idea_<?php echo $feed_utm; ?>&utm_campaign=duplicator_free" target="_blank"><?php _e("Have an idea for the plugin?", 'duplicator') ?></a> <br/>
|
79 |
<?php if($statusCount >= 2) : ?>
|
80 |
+
<!--i class="fa fa-star-o"></i> <a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><?php _e("Help review the plugin!", 'duplicator') ?></a-->
|
81 |
<?php endif; ?>
|
82 |
</div>
|
83 |
|
views/packages/main/s1.setup2.php
CHANGED
@@ -92,10 +92,10 @@ STORAGE -->
|
|
92 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" />
|
93 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" />
|
94 |
<?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s and other storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'FTP'); ?>
|
95 |
-
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_storage&utm_campaign=duplicator_pro" target="_blank"><?php _e('
|
96 |
<i class="fa fa-lightbulb-o"
|
97 |
data-tooltip-title="<?php _e("Additional Storage:", 'duplicator'); ?>"
|
98 |
-
data-tooltip="<?php _e('
|
99 |
. 'based location such as Google Drive, Amazon, Dropbox or FTP.', 'duplicator'); ?>">
|
100 |
</i>
|
101 |
</span>
|
@@ -355,10 +355,10 @@ INSTALLER -->
|
|
355 |
<span class="dup-pro-text">
|
356 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/cpanel-48.png" style="width:16px; height:12px" />
|
357 |
<?php _e("Create the database and users directly at install time with ", 'duplicator'); ?>
|
358 |
-
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_cpanel&utm_campaign=duplicator_pro" target="_blank"><?php _e('
|
359 |
<i class="fa fa-lightbulb-o"
|
360 |
data-tooltip-title="<?php _e("cPanel Access:", 'duplicator'); ?>"
|
361 |
-
data-tooltip="<?php _e('If your server supports cPanel API access then you can create new databases and select existing ones with Duplicator
|
362 |
</i>
|
363 |
</span>
|
364 |
</div>
|
92 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" />
|
93 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" />
|
94 |
<?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s and other storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'FTP'); ?>
|
95 |
+
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_storage&utm_campaign=duplicator_pro" target="_blank"><?php _e('Duplicator Pro', 'duplicator');?></a>
|
96 |
<i class="fa fa-lightbulb-o"
|
97 |
data-tooltip-title="<?php _e("Additional Storage:", 'duplicator'); ?>"
|
98 |
+
data-tooltip="<?php _e('Duplicator Pro allows you to create a package and then store it at a custom location on this server or to a cloud '
|
99 |
. 'based location such as Google Drive, Amazon, Dropbox or FTP.', 'duplicator'); ?>">
|
100 |
</i>
|
101 |
</span>
|
355 |
<span class="dup-pro-text">
|
356 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/cpanel-48.png" style="width:16px; height:12px" />
|
357 |
<?php _e("Create the database and users directly at install time with ", 'duplicator'); ?>
|
358 |
+
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_cpanel&utm_campaign=duplicator_pro" target="_blank"><?php _e('Duplicator Pro', 'duplicator');?></a>
|
359 |
<i class="fa fa-lightbulb-o"
|
360 |
data-tooltip-title="<?php _e("cPanel Access:", 'duplicator'); ?>"
|
361 |
+
data-tooltip="<?php _e('If your server supports cPanel API access then you can create new databases and select existing ones with Duplicator Pro at install time.', 'duplicator'); ?>">
|
362 |
</i>
|
363 |
</span>
|
364 |
</div>
|
views/packages/main/s2.scan1.php
CHANGED
@@ -41,8 +41,9 @@
|
|
41 |
div.scan-item div.title {background-color:#F1F1F1; width:100%; padding:4px 0 4px 0; cursor:pointer; height:20px;}
|
42 |
div.scan-item div.title:hover {background-color:#ECECEC;}
|
43 |
div.scan-item div.text {font-weight:bold; font-size:14px; float:left; position:relative; left:10px}
|
44 |
-
div.scan-item div.badge
|
45 |
-
div.scan-item div.badge-
|
|
|
46 |
div.scan-item div.info {display:none; padding:10px; background:#fff}
|
47 |
div.scan-good {display:inline-block; color:green;font-weight:bold;}
|
48 |
div.scan-warn {display:inline-block; color:#630f0f;font-weight:bold;}
|
@@ -92,7 +93,7 @@
|
|
92 |
div#dup-scan-warning-continue div.msg1 label{font-size:16px; color:#630f0f}
|
93 |
div#dup-scan-warning-continue div.msg2 {padding:2px; line-height:13px}
|
94 |
div#dup-scan-warning-continue div.msg2 label {font-size:11px !important}
|
95 |
-
div.dup-pro-support {text-align:center; font-style:italic; font-size:
|
96 |
|
97 |
/*DIALOG WINDOWS*/
|
98 |
div#arc-details-dlg {font-size:12px}
|
@@ -330,9 +331,9 @@ jQuery(document).ready(function($)
|
|
330 |
var result;
|
331 |
switch (status) {
|
332 |
case false : result = '<div class="scan-warn"><i class="fa fa-exclamation-triangle"></i></div>'; break;
|
333 |
-
case 'Warn' : result = '<div class="badge-warn"><?php _e("Notice", 'duplicator') ?></div>'; break;
|
334 |
case true : result = '<div class="scan-good"><i class="fa fa-check"></i></div>'; break;
|
335 |
-
case 'Good' : result = '<div class="badge-pass"><?php _e("Good", 'duplicator') ?></div>'; break;
|
336 |
default :
|
337 |
result = 'unable to read';
|
338 |
}
|
41 |
div.scan-item div.title {background-color:#F1F1F1; width:100%; padding:4px 0 4px 0; cursor:pointer; height:20px;}
|
42 |
div.scan-item div.title:hover {background-color:#ECECEC;}
|
43 |
div.scan-item div.text {font-weight:bold; font-size:14px; float:left; position:relative; left:10px}
|
44 |
+
div.scan-item div.badge {float:right; border-radius:4px; color:#fff; min-width:40px; text-align:center; position:relative; right:10px; font-size:12px; padding:0 3px 0 3px}
|
45 |
+
div.scan-item div.badge-pass {background:green;}
|
46 |
+
div.scan-item div.badge-warn {background:#630f0f;}
|
47 |
div.scan-item div.info {display:none; padding:10px; background:#fff}
|
48 |
div.scan-good {display:inline-block; color:green;font-weight:bold;}
|
49 |
div.scan-warn {display:inline-block; color:#630f0f;font-weight:bold;}
|
93 |
div#dup-scan-warning-continue div.msg1 label{font-size:16px; color:#630f0f}
|
94 |
div#dup-scan-warning-continue div.msg2 {padding:2px; line-height:13px}
|
95 |
div#dup-scan-warning-continue div.msg2 label {font-size:11px !important}
|
96 |
+
div.dup-pro-support {text-align:center; font-style:italic; font-size:13px; margin-top:20px;font-weight:bold}
|
97 |
|
98 |
/*DIALOG WINDOWS*/
|
99 |
div#arc-details-dlg {font-size:12px}
|
331 |
var result;
|
332 |
switch (status) {
|
333 |
case false : result = '<div class="scan-warn"><i class="fa fa-exclamation-triangle"></i></div>'; break;
|
334 |
+
case 'Warn' : result = '<div class="badge badge-warn"><?php _e("Notice", 'duplicator') ?></div>'; break;
|
335 |
case true : result = '<div class="scan-good"><i class="fa fa-check"></i></div>'; break;
|
336 |
+
case 'Good' : result = '<div class="badge badge-pass"><?php _e("Good", 'duplicator') ?></div>'; break;
|
337 |
default :
|
338 |
result = 'unable to read';
|
339 |
}
|
views/packages/main/s2.scan2.php
CHANGED
@@ -66,7 +66,8 @@ WP SETTINGS -->
|
|
66 |
<?php
|
67 |
//VERSION CHECK
|
68 |
echo '<span id="data-srv-wp-version"></span> <b>' . __('WordPress Version', 'duplicator') . ":</b> '{$wp_version}' <br/>";
|
69 |
-
printf(__('It is recommended to have a version of WordPress that is greater than %1$s
|
|
|
70 |
|
71 |
//CORE FILES
|
72 |
echo '<hr size="1" /><span id="data-srv-wp-core"></span> <b>' . __('Core Files', 'duplicator') . "</b> <br/>";
|
66 |
<?php
|
67 |
//VERSION CHECK
|
68 |
echo '<span id="data-srv-wp-version"></span> <b>' . __('WordPress Version', 'duplicator') . ":</b> '{$wp_version}' <br/>";
|
69 |
+
printf(__('It is recommended to have a version of WordPress that is greater than %1$s. Older version of WordPress can lead to migration issues and are a security risk. '
|
70 |
+
. 'If possible please update your WordPress site to the latest version.', 'duplicator'), DUPLICATOR_SCAN_MIN_WP);
|
71 |
|
72 |
//CORE FILES
|
73 |
echo '<hr size="1" /><span id="data-srv-wp-core"></span> <b>' . __('Core Files', 'duplicator') . "</b> <br/>";
|
views/packages/main/s2.scan3.php
CHANGED
@@ -53,7 +53,7 @@ TOTAL SIZE -->
|
|
53 |
echo "<b>" . __('Overview', 'duplicator') . ":</b><br/>";
|
54 |
|
55 |
printf(__('This notice is triggered at <b>%s</b> and can be ignored on most hosts. If during the build process you see a "Host Build Interrupt" message then this '
|
56 |
-
. 'host has strict processing limits. Below are some options you can take to overcome constraints
|
57 |
DUP_Util::byteSize(DUPLICATOR_SCAN_SIZE_DEFAULT));
|
58 |
|
59 |
echo '<br/><br/>';
|
@@ -61,7 +61,7 @@ TOTAL SIZE -->
|
|
61 |
echo "<b>" . __('Timeout Options', 'duplicator') . ":</b><br/>";
|
62 |
echo '<ul>';
|
63 |
echo '<li>' . __('Apply the "Quick Filters" below or click the back button to apply on previous page.', 'duplicator') . '</li>';
|
64 |
-
echo '<li>' . __('See the FAQ link to adjust this hosts timeout limits: ', 'duplicator') . " <a href='https://snapcreek.com/duplicator/docs/faqs-tech
|
65 |
echo '<li>' . __('Consider trying multi-threaded support in ', 'duplicator');
|
66 |
echo "<a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=multithreaded_pro&utm_campaign=duplicator_pro' target='_blank'>" . __('Duplicator Pro.', 'duplicator') . "</a>";
|
67 |
echo '</li>';
|
@@ -114,8 +114,8 @@ TOTAL SIZE -->
|
|
114 |
_e('No large files found during this scan.', 'duplicator');
|
115 |
} else {
|
116 |
echo "<div style='color:maroon'>";
|
117 |
-
_e('No large files found during this scan. If
|
118 |
-
. 'adding the following file filters to non-essential files paths like wp-
|
119 |
. 'be manually moved to the new location after you have ran the migration installer.', 'duplicator');
|
120 |
echo "</div>";
|
121 |
}
|
@@ -154,7 +154,7 @@ FILE NAME CHECKS -->
|
|
154 |
_e('<b>');
|
155 |
_e(' Only consider using this filter if the package build is failing. Select files that are not important to your site or you can migrate manually.', 'duplicator');
|
156 |
_e('</b>');
|
157 |
-
$txt = __('If this environment/system and the system where it will be installed are
|
158 |
. 'If you run into issues with creating or installing a package, then is recommended to filter these paths.', 'duplicator');
|
159 |
?>
|
160 |
<script id="hb-files-utf8" type="text/x-handlebars-template">
|
@@ -286,14 +286,11 @@ DATABASE -->
|
|
286 |
</div>
|
287 |
|
288 |
<?php
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
} else {
|
295 |
-
echo '<br/>';
|
296 |
-
}
|
297 |
?>
|
298 |
|
299 |
</div>
|
53 |
echo "<b>" . __('Overview', 'duplicator') . ":</b><br/>";
|
54 |
|
55 |
printf(__('This notice is triggered at <b>%s</b> and can be ignored on most hosts. If during the build process you see a "Host Build Interrupt" message then this '
|
56 |
+
. 'host has strict processing limits. Below are some options you can take to overcome constraints set up on this host.', 'duplicator'),
|
57 |
DUP_Util::byteSize(DUPLICATOR_SCAN_SIZE_DEFAULT));
|
58 |
|
59 |
echo '<br/><br/>';
|
61 |
echo "<b>" . __('Timeout Options', 'duplicator') . ":</b><br/>";
|
62 |
echo '<ul>';
|
63 |
echo '<li>' . __('Apply the "Quick Filters" below or click the back button to apply on previous page.', 'duplicator') . '</li>';
|
64 |
+
echo '<li>' . __('See the FAQ link to adjust this hosts timeout limits: ', 'duplicator') . " <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=pkg_s2scan3_tolimits#faq-trouble-100-q' target='_blank'>" . __('What can I try for Timeout Issues?', 'duplicator') . '</a></li>';
|
65 |
echo '<li>' . __('Consider trying multi-threaded support in ', 'duplicator');
|
66 |
echo "<a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=multithreaded_pro&utm_campaign=duplicator_pro' target='_blank'>" . __('Duplicator Pro.', 'duplicator') . "</a>";
|
67 |
echo '</li>';
|
114 |
_e('No large files found during this scan.', 'duplicator');
|
115 |
} else {
|
116 |
echo "<div style='color:maroon'>";
|
117 |
+
_e('No large files found during this scan. If you\'re having issues building a package click the back button and try '
|
118 |
+
. 'adding the following file filters to non-essential files paths like wp-content/uploads. These filtered files can then '
|
119 |
. 'be manually moved to the new location after you have ran the migration installer.', 'duplicator');
|
120 |
echo "</div>";
|
121 |
}
|
154 |
_e('<b>');
|
155 |
_e(' Only consider using this filter if the package build is failing. Select files that are not important to your site or you can migrate manually.', 'duplicator');
|
156 |
_e('</b>');
|
157 |
+
$txt = __('If this environment/system and the system where it will be installed are set up to support Unicode and long paths then these filters can be ignored. '
|
158 |
. 'If you run into issues with creating or installing a package, then is recommended to filter these paths.', 'duplicator');
|
159 |
?>
|
160 |
<script id="hb-files-utf8" type="text/x-handlebars-template">
|
286 |
</div>
|
287 |
|
288 |
<?php
|
289 |
+
|
290 |
+
echo '<div class="dup-pro-support"> ';
|
291 |
+
_e('Package support up to 2GB available in', 'duplicator');
|
292 |
+
echo ' <i><a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_size_warn&utm_campaign=duplicator_pro" target="_blank">' . __('Duplicator Pro', 'duplicator') . '!</a></i>';
|
293 |
+
echo '</div>';
|
|
|
|
|
|
|
294 |
?>
|
295 |
|
296 |
</div>
|
views/packages/main/s3.build.php
CHANGED
@@ -6,14 +6,14 @@
|
|
6 |
$atext0 = __('Help', 'duplicator') . " <a target='_blank' href='https://wordpress.org/support/plugin/duplicator/reviews/?filter=5'>";
|
7 |
$atext0 .= __('review the plugin', 'duplicator') . '</a> ' . __('on WordPress.org!', 'duplicator');
|
8 |
|
9 |
-
//Get even more power & features with
|
10 |
-
$atext1 = __('
|
11 |
$atext1 .= " <a target='_blank' href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_build_more_power&utm_campaign=duplicator_pro'>";
|
12 |
-
$atext1 .= __('
|
13 |
|
14 |
$rand_txt = array();
|
15 |
$rand_txt[0] = $atext0;
|
16 |
-
|
17 |
?>
|
18 |
|
19 |
<style>
|
@@ -25,12 +25,20 @@
|
|
25 |
div#dup-msg-success {color:#18592A; padding:5px;}
|
26 |
|
27 |
div.dup-msg-success-stats{color:#999;margin:10px 0px 0px 0px}
|
28 |
-
div.dup-msg-success-links {margin:20px 5px 5px 5px; font-size:
|
29 |
div#dup-progress-area div.done-title {font-size:22px; font-weight:bold; margin:0px 0px 10px 0px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
div.dup-button-footer {text-align:right; margin:20px 10px 0px 0px}
|
31 |
button.button {font-size:16px !important; height:30px !important; font-weight:bold; padding:0px 10px 5px 10px !important; min-width: 150px }
|
32 |
span.dup-btn-size {font-size:11px;font-weight: normal}
|
33 |
-
p.get-pro {font-size:
|
34 |
|
35 |
/*HOST TIMEOUT */
|
36 |
div#dup-msg-error {color:maroon; padding:5px;}
|
@@ -95,24 +103,43 @@ TOOL BAR: STEPS -->
|
|
95 |
<div class="dup-msg-success-stats">
|
96 |
<b><?php _e('Name', 'duplicator'); ?>:</b> <span id="data-name-hash"></span><br/>
|
97 |
<b><?php _e('Process Time', 'duplicator'); ?>:</b> <span id="data-time"></span><br/>
|
98 |
-
</div><br/>
|
99 |
-
|
100 |
-
<button id="dup-btn-installer" class="button button-primary button-large">
|
101 |
-
<i class="fa fa-bolt"></i> <?php _e("Installer", 'duplicator') ?>
|
102 |
-
<span id="dup-btn-installer-size" class="dup-btn-size"></span>
|
103 |
-
</button>
|
104 |
-
<button id="dup-btn-archive" class="button button-primary button-large">
|
105 |
-
<i class="fa fa-file-archive-o"></i> <?php _e("Archive", 'duplicator') ?>
|
106 |
-
<span id="dup-btn-archive-size" class="dup-btn-size"></span>
|
107 |
-
</button>
|
108 |
-
<div style='margin: 7px 0 40px 0; color:#999'>
|
109 |
-
<small><i><?php _e("click buttons to download", 'duplicator') ?></i></small>
|
110 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
<div class="dup-msg-success-links">
|
112 |
<?php printf("<a href='?page=duplicator'>[ %s ]</a>", __('All Packages', 'duplicator'));?>
|
113 |
<?php printf("<a href='?page=duplicator&tab=new1'>[ %s ]</a>", __('Create New', 'duplicator'));?>
|
114 |
</div>
|
115 |
-
<br/>
|
116 |
<p class="get-pro">
|
117 |
<?php echo $rand_txt[array_rand($rand_txt, 1)]; ?>
|
118 |
</p>
|
@@ -136,7 +163,7 @@ TOOL BAR: STEPS -->
|
|
136 |
<b class="opt-title"><?php _e('OPTION 1:', 'duplicator'); ?></b><br/>
|
137 |
|
138 |
<?php _e('The first pass for reading files on some budget hosts is slow and may conflict with strict timeout settings '
|
139 |
-
. '
|
140 |
|
141 |
<div style="text-align: center; margin: 10px">
|
142 |
<input type="button" class="button-large button-primary" value="<?php _e('Retry Package Build', 'duplicator'); ?>" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=1'" />
|
@@ -203,7 +230,7 @@ TOOL BAR: STEPS -->
|
|
203 |
|
204 |
<b class="opt-title"><?php _e('OPTION 3:', 'duplicator'); ?></b><br/>
|
205 |
<?php _e('This option is available on some hosts that allow for users to adjust server configurations. With this option you will be directed to an FAQ page that will show '
|
206 |
-
. 'various recommendations you can take to improve/unlock constraints
|
207 |
|
208 |
<div style="text-align: center; margin: 10px">
|
209 |
<input type="button" style="margin-right:10px;" class="button-large button-primary" value="<?php _e('Diagnose Server Setup', 'duplicator'); ?>"
|
@@ -313,7 +340,14 @@ jQuery(document).ready(function($) {
|
|
313 |
//Wire Up Downloads
|
314 |
$('#dup-btn-installer').on("click", {name: InstallURL }, Duplicator.Pack.DownloadFile );
|
315 |
$('#dup-btn-archive').on("click", {name: ArchiveURL }, Duplicator.Pack.DownloadFile );
|
316 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
},
|
318 |
error: function(data) {
|
319 |
$('#dup-progress-bar-area').hide();
|
6 |
$atext0 = __('Help', 'duplicator') . " <a target='_blank' href='https://wordpress.org/support/plugin/duplicator/reviews/?filter=5'>";
|
7 |
$atext0 .= __('review the plugin', 'duplicator') . '</a> ' . __('on WordPress.org!', 'duplicator');
|
8 |
|
9 |
+
//Get even more power & features with Duplicator Pro
|
10 |
+
$atext1 = __('Want more power? Try', 'duplicator');
|
11 |
$atext1 .= " <a target='_blank' href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_build_more_power&utm_campaign=duplicator_pro'>";
|
12 |
+
$atext1 .= __('Duplicator Pro', 'duplicator') . '</a>!';
|
13 |
|
14 |
$rand_txt = array();
|
15 |
$rand_txt[0] = $atext0;
|
16 |
+
//$rand_txt[1] = $atext1;
|
17 |
?>
|
18 |
|
19 |
<style>
|
25 |
div#dup-msg-success {color:#18592A; padding:5px;}
|
26 |
|
27 |
div.dup-msg-success-stats{color:#999;margin:10px 0px 0px 0px}
|
28 |
+
div.dup-msg-success-links {margin:20px 5px 5px 5px; font-size: 13px;}
|
29 |
div#dup-progress-area div.done-title {font-size:22px; font-weight:bold; margin:0px 0px 10px 0px}
|
30 |
+
div#dup-progress-area div.dup-panel-title {background-color: #dfdfdf;}
|
31 |
+
|
32 |
+
div#dup-progress-area div.dup-panel-panel { border-top: 1px solid silver}
|
33 |
+
fieldset.download-area {border:2px dashed #dfdfdf; padding:20px 20px 10px 20px; border-radius:9px; margin: auto; width:400px }
|
34 |
+
fieldset.download-area legend {font-weight: bold; font-size: 16px}
|
35 |
+
button#dup-btn-installer, button#dup-btn-archive {min-width: 150px}
|
36 |
+
div.one-click-download {margin:20px 0 10px 0; font-style: italic; font-size:16px; font-weight: bold}
|
37 |
+
|
38 |
div.dup-button-footer {text-align:right; margin:20px 10px 0px 0px}
|
39 |
button.button {font-size:16px !important; height:30px !important; font-weight:bold; padding:0px 10px 5px 10px !important; min-width: 150px }
|
40 |
span.dup-btn-size {font-size:11px;font-weight: normal}
|
41 |
+
p.get-pro {font-size:13px; color:#999; border-top:1px solid #eeeeee; padding:5px 0 0 0; margin:0; font-style:italic}
|
42 |
|
43 |
/*HOST TIMEOUT */
|
44 |
div#dup-msg-error {color:maroon; padding:5px;}
|
103 |
<div class="dup-msg-success-stats">
|
104 |
<b><?php _e('Name', 'duplicator'); ?>:</b> <span id="data-name-hash"></span><br/>
|
105 |
<b><?php _e('Process Time', 'duplicator'); ?>:</b> <span id="data-time"></span><br/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
</div>
|
107 |
+
<br/><br/>
|
108 |
+
|
109 |
+
<!-- DOWNLOAD FILES -->
|
110 |
+
<fieldset class="download-area">
|
111 |
+
<legend>
|
112 |
+
<i class="fa fa-download"></i> <?php _e("Download Files", 'duplicator') ?>
|
113 |
+
</legend>
|
114 |
+
<button id="dup-btn-installer" class="button button-primary button-large" title="<?php _e("Click to download installer file", 'duplicator') ?>">
|
115 |
+
<i class="fa fa-bolt"></i> <?php _e("Installer", 'duplicator') ?>
|
116 |
+
|
117 |
+
</button>
|
118 |
+
<button id="dup-btn-archive" class="button button-primary button-large" title="<?php _e("Click to download archive file", 'duplicator') ?>">
|
119 |
+
<i class="fa fa-file-archive-o"></i> <?php _e("Archive", 'duplicator') ?>
|
120 |
+
<span id="dup-btn-archive-size" class="dup-btn-size"></span>
|
121 |
+
|
122 |
+
</button>
|
123 |
+
<div class="one-click-download">
|
124 |
+
<a href="javascript:void(0)" id="dup-link-download-both" title="<?php _e("Click to download both files", 'duplicator') ?>">
|
125 |
+
<?php _e("One-Click Download", 'duplicator') ?><i class="fa fa-download" style="padding-left:5px; color:#0073AA"></i>
|
126 |
+
</a>
|
127 |
+
|
128 |
+
</div>
|
129 |
+
</fieldset>
|
130 |
+
<br/><br/>
|
131 |
+
|
132 |
+
<div style="font-size:16px; font-style: italic">
|
133 |
+
<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_built_install_help&utm_campaign=duplicator_free#quick-040-q" target="_blank">
|
134 |
+
<?php _e('How do I install this Package?', 'duplicator'); ?>
|
135 |
+
</a>
|
136 |
+
</div>
|
137 |
+
<br/>
|
138 |
+
|
139 |
<div class="dup-msg-success-links">
|
140 |
<?php printf("<a href='?page=duplicator'>[ %s ]</a>", __('All Packages', 'duplicator'));?>
|
141 |
<?php printf("<a href='?page=duplicator&tab=new1'>[ %s ]</a>", __('Create New', 'duplicator'));?>
|
142 |
</div>
|
|
|
143 |
<p class="get-pro">
|
144 |
<?php echo $rand_txt[array_rand($rand_txt, 1)]; ?>
|
145 |
</p>
|
163 |
<b class="opt-title"><?php _e('OPTION 1:', 'duplicator'); ?></b><br/>
|
164 |
|
165 |
<?php _e('The first pass for reading files on some budget hosts is slow and may conflict with strict timeout settings '
|
166 |
+
. 'set up by the hosting provider. If this is the case its recommended to retry the build. <i>If the problem persists then consider the other options below.</i>', 'duplicator'); ?><br/><br/>
|
167 |
|
168 |
<div style="text-align: center; margin: 10px">
|
169 |
<input type="button" class="button-large button-primary" value="<?php _e('Retry Package Build', 'duplicator'); ?>" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=1'" />
|
230 |
|
231 |
<b class="opt-title"><?php _e('OPTION 3:', 'duplicator'); ?></b><br/>
|
232 |
<?php _e('This option is available on some hosts that allow for users to adjust server configurations. With this option you will be directed to an FAQ page that will show '
|
233 |
+
. 'various recommendations you can take to improve/unlock constraints set up on this server.', 'duplicator'); ?><br/><br/>
|
234 |
|
235 |
<div style="text-align: center; margin: 10px">
|
236 |
<input type="button" style="margin-right:10px;" class="button-large button-primary" value="<?php _e('Diagnose Server Setup', 'duplicator'); ?>"
|
340 |
//Wire Up Downloads
|
341 |
$('#dup-btn-installer').on("click", {name: InstallURL }, Duplicator.Pack.DownloadFile );
|
342 |
$('#dup-btn-archive').on("click", {name: ArchiveURL }, Duplicator.Pack.DownloadFile );
|
343 |
+
|
344 |
+
$('#dup-link-download-both').on("click", function() {
|
345 |
+
window.open(InstallURL);
|
346 |
+
window.open(ArchiveURL);
|
347 |
+
|
348 |
+
});
|
349 |
+
|
350 |
+
|
351 |
},
|
352 |
error: function(data) {
|
353 |
$('#dup-progress-bar-area').hide();
|
views/settings/schedule.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
<style>
|
2 |
-
div.panel {padding: 20px 5px 10px 10px;}
|
3 |
-
div.area {font-size:16px; text-align: center; line-height: 30px}
|
4 |
-
</style>
|
5 |
-
|
6 |
-
<div class="panel">
|
7 |
-
|
8 |
-
<br/>
|
9 |
-
<div class="area">
|
10 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
11 |
-
<?php
|
12 |
-
echo '<h2><i class="fa fa-clock-o"></i> ' . __('This option is available in Duplicator
|
13 |
-
_e('Create robust automated schedules that automatically create packages while you sleep.', 'duplicator');
|
14 |
-
echo '<br/>';
|
15 |
-
_e('Simply choose your storage location and when you want it to run.', 'duplicator');
|
16 |
-
?>
|
17 |
-
</div>
|
18 |
-
<p style="text-align:center">
|
19 |
-
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_settings_schedule&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
20 |
-
<?php _e('Learn More', 'duplicator') ?>
|
21 |
-
</a>
|
22 |
-
</p>
|
23 |
-
</div>
|
24 |
-
|
25 |
-
|
1 |
+
<style>
|
2 |
+
div.panel {padding: 20px 5px 10px 10px;}
|
3 |
+
div.area {font-size:16px; text-align: center; line-height: 30px}
|
4 |
+
</style>
|
5 |
+
|
6 |
+
<div class="panel">
|
7 |
+
|
8 |
+
<br/>
|
9 |
+
<div class="area">
|
10 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
11 |
+
<?php
|
12 |
+
echo '<h2><i class="fa fa-clock-o"></i> ' . __('This option is available in Duplicator Pro.', 'duplicator') . '</h2>';
|
13 |
+
_e('Create robust automated schedules that automatically create packages while you sleep.', 'duplicator');
|
14 |
+
echo '<br/>';
|
15 |
+
_e('Simply choose your storage location and when you want it to run.', 'duplicator');
|
16 |
+
?>
|
17 |
+
</div>
|
18 |
+
<p style="text-align:center">
|
19 |
+
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_settings_schedule&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
20 |
+
<?php _e('Learn More', 'duplicator') ?>
|
21 |
+
</a>
|
22 |
+
</p>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
|
views/settings/storage.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
<div class="area">
|
11 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
12 |
<h2>
|
13 |
-
<?php _e('Store your packages in multiple<br/> locations with Duplicator
|
14 |
</h2>
|
15 |
|
16 |
<div style='text-align: left; margin:auto; width:200px'>
|
@@ -23,7 +23,7 @@
|
|
23 |
</ul>
|
24 |
</div>
|
25 |
<?php
|
26 |
-
_e('
|
27 |
?>
|
28 |
</div><br/>
|
29 |
|
10 |
<div class="area">
|
11 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
12 |
<h2>
|
13 |
+
<?php _e('Store your packages in multiple<br/> locations with Duplicator Pro', 'duplicator') ?>
|
14 |
</h2>
|
15 |
|
16 |
<div style='text-align: left; margin:auto; width:200px'>
|
23 |
</ul>
|
24 |
</div>
|
25 |
<?php
|
26 |
+
_e('Set up a one-time storage location and automatically <br/> push the package to your destination.', 'duplicator');
|
27 |
?>
|
28 |
</div><br/>
|
29 |
|
views/tools/support.php
CHANGED
@@ -1,123 +1,123 @@
|
|
1 |
-
<style>
|
2 |
-
div.dup-support-all {font-size:13px; line-height:20px}
|
3 |
-
div.dup-support-txts-links {width:100%;font-size:14px; font-weight:bold; line-height:26px; text-align:center}
|
4 |
-
div.dup-support-hlp-area {width:375px; height:160px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
|
5 |
-
table.dup-support-hlp-hdrs {border-collapse:collapse; width:100%; border-bottom:1px solid #dfdfdf}
|
6 |
-
table.dup-support-hlp-hdrs {background-color:#efefef;}
|
7 |
-
div.dup-support-hlp-hdrs {
|
8 |
-
font-weight:bold; font-size:17px; height: 35px; padding:5px 5px 5px 10px;
|
9 |
-
background-image:-ms-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
10 |
-
background-image:-moz-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
11 |
-
background-image:-o-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
12 |
-
background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #FFFFFF), color-stop(1, #DEDEDE));
|
13 |
-
background-image:-webkit-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
14 |
-
background-image:linear-gradient(to bottom, #FFFFFF 0%, #DEDEDE 100%);
|
15 |
-
}
|
16 |
-
div.dup-support-hlp-hdrs div {padding:5px; margin:4px 20px 0px -20px; text-align: center;}
|
17 |
-
div.dup-support-hlp-txt{padding:10px 4px 4px 4px; text-align:center}
|
18 |
-
</style>
|
19 |
-
|
20 |
-
|
21 |
-
<div class="wrap dup-wrap dup-support-all">
|
22 |
-
|
23 |
-
<div style="width:800px; margin:auto; margin-top: 20px">
|
24 |
-
<table>
|
25 |
-
<tr>
|
26 |
-
<td style="width:70px"><i class="fa fa-question-circle fa-5x"></i></td>
|
27 |
-
<td valign="top" style="padding-top:10px; font-size:13px">
|
28 |
-
<?php
|
29 |
-
_e("Migrating WordPress is a complex process and the logic to make all the magic happen smoothly may not work quickly with every site. With over 30,000 plugins and a very complex server eco-system some migrations may run into issues. This is why the Duplicator includes a detailed knowledgebase that can help with many common issues. Resources to additional support, approved hosting, and alternatives to fit your needs can be found below.", 'duplicator');
|
30 |
-
?>
|
31 |
-
</td>
|
32 |
-
</tr>
|
33 |
-
</table>
|
34 |
-
<br/><br/>
|
35 |
-
|
36 |
-
<!-- HELP LINKS -->
|
37 |
-
<div class="dup-support-hlp-area">
|
38 |
-
<div class="dup-support-hlp-hdrs">
|
39 |
-
<i class="fa fa-cube fa-2x pull-left"></i>
|
40 |
-
<div><?php _e('Knowledgebase', 'duplicator') ?></div>
|
41 |
-
</div>
|
42 |
-
<div class="dup-support-hlp-txt">
|
43 |
-
<?php _e('Complete Online Documentation', 'duplicator'); ?><br/>
|
44 |
-
<select id="dup-support-kb-lnks" style="margin-top:18px; font-size:16px; min-width: 170px">
|
45 |
-
<option> <?php _e('Choose A Section', 'duplicator') ?> </option>
|
46 |
-
<option value="https://snapcreek.com/duplicator/docs/quick-start
|
47 |
-
<option value="https://snapcreek.com/duplicator/docs/guide
|
48 |
-
<option value="https://snapcreek.com/duplicator/docs/faqs-tech
|
49 |
-
<option value="https://snapcreek.com/duplicator/docs/changelog/?lite"><?php _e('Change Log', 'duplicator') ?></option>
|
50 |
-
</select>
|
51 |
-
</div>
|
52 |
-
</div>
|
53 |
-
|
54 |
-
<!-- ONLINE SUPPORT -->
|
55 |
-
<div class="dup-support-hlp-area">
|
56 |
-
<div class="dup-support-hlp-hdrs">
|
57 |
-
<i class="fa fa-lightbulb-o fa-2x pull-left"></i>
|
58 |
-
<div><?php _e('Online Support', 'duplicator') ?></div>
|
59 |
-
</div>
|
60 |
-
<div class="dup-support-hlp-txt">
|
61 |
-
<?php _e("Get Help From IT Professionals", 'duplicator'); ?>
|
62 |
-
<br/>
|
63 |
-
<div class="dup-support-txts-links" style="margin:10px 0 10px 0">
|
64 |
-
<button class="button button-primary button-large" onclick="Duplicator.OpenSupportWindow();return false;">
|
65 |
-
<?php _e('Get Support!', 'duplicator') ?>
|
66 |
-
</button> <br/>
|
67 |
-
</div>
|
68 |
-
<small>Pro Users <a href="https://snapcreek.com/ticket" target="_blank">Support Here</a></small>
|
69 |
-
</div>
|
70 |
-
</div>
|
71 |
-
<br style="clear:both" /><br/><br/>
|
72 |
-
|
73 |
-
|
74 |
-
<!-- APPROVED HOSTING -->
|
75 |
-
<div class="dup-support-hlp-area">
|
76 |
-
|
77 |
-
<div class="dup-support-hlp-hdrs">
|
78 |
-
<i class="fa fa-bolt fa-2x pull-left"></i>
|
79 |
-
<div><?php _e('Approved Hosting', 'duplicator') ?></div>
|
80 |
-
</div>
|
81 |
-
<div class="dup-support-hlp-txt">
|
82 |
-
<?php _e('Servers That Work With Duplicator', 'duplicator'); ?>
|
83 |
-
<br/><br/>
|
84 |
-
<div class="dup-support-txts-links">
|
85 |
-
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech
|
86 |
-
</div>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<!-- ALTERNATIVES -->
|
91 |
-
<div class="dup-support-hlp-area">
|
92 |
-
|
93 |
-
<div class="dup-support-hlp-hdrs">
|
94 |
-
<i class="fa fa-code-fork fa-2x pull-left"></i>
|
95 |
-
<div><?php _e('Alternatives', 'duplicator') ?></div>
|
96 |
-
</div>
|
97 |
-
<div class="dup-support-hlp-txt">
|
98 |
-
<?php _e('Other Commercial Resources', 'duplicator'); ?>
|
99 |
-
<br/><br/>
|
100 |
-
<div class="dup-support-txts-links">
|
101 |
-
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech
|
102 |
-
</div>
|
103 |
-
</div>
|
104 |
-
</div>
|
105 |
-
</div>
|
106 |
-
</div><br/><br/><br/><br/>
|
107 |
-
|
108 |
-
<script>
|
109 |
-
jQuery(document).ready(function($) {
|
110 |
-
|
111 |
-
Duplicator.OpenSupportWindow = function() {
|
112 |
-
var url = 'https://snapcreek.com/duplicator/docs/faqs-tech
|
113 |
-
window.open(url, 'litg');
|
114 |
-
}
|
115 |
-
|
116 |
-
//ATTACHED EVENTS
|
117 |
-
jQuery('#dup-support-kb-lnks').change(function() {
|
118 |
-
if (jQuery(this).val() != "null")
|
119 |
-
window.open(jQuery(this).val())
|
120 |
-
});
|
121 |
-
|
122 |
-
});
|
123 |
</script>
|
1 |
+
<style>
|
2 |
+
div.dup-support-all {font-size:13px; line-height:20px}
|
3 |
+
div.dup-support-txts-links {width:100%;font-size:14px; font-weight:bold; line-height:26px; text-align:center}
|
4 |
+
div.dup-support-hlp-area {width:375px; height:160px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
|
5 |
+
table.dup-support-hlp-hdrs {border-collapse:collapse; width:100%; border-bottom:1px solid #dfdfdf}
|
6 |
+
table.dup-support-hlp-hdrs {background-color:#efefef;}
|
7 |
+
div.dup-support-hlp-hdrs {
|
8 |
+
font-weight:bold; font-size:17px; height: 35px; padding:5px 5px 5px 10px;
|
9 |
+
background-image:-ms-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
10 |
+
background-image:-moz-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
11 |
+
background-image:-o-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
12 |
+
background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #FFFFFF), color-stop(1, #DEDEDE));
|
13 |
+
background-image:-webkit-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
14 |
+
background-image:linear-gradient(to bottom, #FFFFFF 0%, #DEDEDE 100%);
|
15 |
+
}
|
16 |
+
div.dup-support-hlp-hdrs div {padding:5px; margin:4px 20px 0px -20px; text-align: center;}
|
17 |
+
div.dup-support-hlp-txt{padding:10px 4px 4px 4px; text-align:center}
|
18 |
+
</style>
|
19 |
+
|
20 |
+
|
21 |
+
<div class="wrap dup-wrap dup-support-all">
|
22 |
+
|
23 |
+
<div style="width:800px; margin:auto; margin-top: 20px">
|
24 |
+
<table>
|
25 |
+
<tr>
|
26 |
+
<td style="width:70px"><i class="fa fa-question-circle fa-5x"></i></td>
|
27 |
+
<td valign="top" style="padding-top:10px; font-size:13px">
|
28 |
+
<?php
|
29 |
+
_e("Migrating WordPress is a complex process and the logic to make all the magic happen smoothly may not work quickly with every site. With over 30,000 plugins and a very complex server eco-system some migrations may run into issues. This is why the Duplicator includes a detailed knowledgebase that can help with many common issues. Resources to additional support, approved hosting, and alternatives to fit your needs can be found below.", 'duplicator');
|
30 |
+
?>
|
31 |
+
</td>
|
32 |
+
</tr>
|
33 |
+
</table>
|
34 |
+
<br/><br/>
|
35 |
+
|
36 |
+
<!-- HELP LINKS -->
|
37 |
+
<div class="dup-support-hlp-area">
|
38 |
+
<div class="dup-support-hlp-hdrs">
|
39 |
+
<i class="fa fa-cube fa-2x pull-left"></i>
|
40 |
+
<div><?php _e('Knowledgebase', 'duplicator') ?></div>
|
41 |
+
</div>
|
42 |
+
<div class="dup-support-hlp-txt">
|
43 |
+
<?php _e('Complete Online Documentation', 'duplicator'); ?><br/>
|
44 |
+
<select id="dup-support-kb-lnks" style="margin-top:18px; font-size:16px; min-width: 170px">
|
45 |
+
<option> <?php _e('Choose A Section', 'duplicator') ?> </option>
|
46 |
+
<option value="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_qs"><?php _e('Quick Start', 'duplicator') ?></option>
|
47 |
+
<option value="https://snapcreek.com/duplicator/docs/guide/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_guide"><?php _e('User Guide', 'duplicator') ?></option>
|
48 |
+
<option value="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_FAQs"><?php _e('FAQs', 'duplicator') ?></option>
|
49 |
+
<option value="https://snapcreek.com/duplicator/docs/changelog/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_changelog&lite"><?php _e('Change Log', 'duplicator') ?></option>
|
50 |
+
</select>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
|
54 |
+
<!-- ONLINE SUPPORT -->
|
55 |
+
<div class="dup-support-hlp-area">
|
56 |
+
<div class="dup-support-hlp-hdrs">
|
57 |
+
<i class="fa fa-lightbulb-o fa-2x pull-left"></i>
|
58 |
+
<div><?php _e('Online Support', 'duplicator') ?></div>
|
59 |
+
</div>
|
60 |
+
<div class="dup-support-hlp-txt">
|
61 |
+
<?php _e("Get Help From IT Professionals", 'duplicator'); ?>
|
62 |
+
<br/>
|
63 |
+
<div class="dup-support-txts-links" style="margin:10px 0 10px 0">
|
64 |
+
<button class="button button-primary button-large" onclick="Duplicator.OpenSupportWindow();return false;">
|
65 |
+
<?php _e('Get Support!', 'duplicator') ?>
|
66 |
+
</button> <br/>
|
67 |
+
</div>
|
68 |
+
<small>Pro Users <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_prousers_here" target="_blank">Support Here</a></small>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
<br style="clear:both" /><br/><br/>
|
72 |
+
|
73 |
+
|
74 |
+
<!-- APPROVED HOSTING -->
|
75 |
+
<div class="dup-support-hlp-area">
|
76 |
+
|
77 |
+
<div class="dup-support-hlp-hdrs">
|
78 |
+
<i class="fa fa-bolt fa-2x pull-left"></i>
|
79 |
+
<div><?php _e('Approved Hosting', 'duplicator') ?></div>
|
80 |
+
</div>
|
81 |
+
<div class="dup-support-hlp-txt">
|
82 |
+
<?php _e('Servers That Work With Duplicator', 'duplicator'); ?>
|
83 |
+
<br/><br/>
|
84 |
+
<div class="dup-support-txts-links">
|
85 |
+
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_servers#faq-resource-040-q', 'litg');"><?php _e('Trusted Providers!', 'duplicator') ?></button>
|
86 |
+
</div>
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
|
90 |
+
<!-- ALTERNATIVES -->
|
91 |
+
<div class="dup-support-hlp-area">
|
92 |
+
|
93 |
+
<div class="dup-support-hlp-hdrs">
|
94 |
+
<i class="fa fa-code-fork fa-2x pull-left"></i>
|
95 |
+
<div><?php _e('Alternatives', 'duplicator') ?></div>
|
96 |
+
</div>
|
97 |
+
<div class="dup-support-hlp-txt">
|
98 |
+
<?php _e('Other Commercial Resources', 'duplicator'); ?>
|
99 |
+
<br/><br/>
|
100 |
+
<div class="dup-support-txts-links">
|
101 |
+
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_pro_sln#faq-resource-050-q', 'litg');"><?php _e('Pro Solutions!', 'duplicator') ?></button>
|
102 |
+
</div>
|
103 |
+
</div>
|
104 |
+
</div>
|
105 |
+
</div>
|
106 |
+
</div><br/><br/><br/><br/>
|
107 |
+
|
108 |
+
<script>
|
109 |
+
jQuery(document).ready(function($) {
|
110 |
+
|
111 |
+
Duplicator.OpenSupportWindow = function() {
|
112 |
+
var url = 'https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_window#faq-resource';
|
113 |
+
window.open(url, 'litg');
|
114 |
+
}
|
115 |
+
|
116 |
+
//ATTACHED EVENTS
|
117 |
+
jQuery('#dup-support-kb-lnks').change(function() {
|
118 |
+
if (jQuery(this).val() != "null")
|
119 |
+
window.open(jQuery(this).val())
|
120 |
+
});
|
121 |
+
|
122 |
+
});
|
123 |
</script>
|