| Server IP : 146.59.209.152 / Your IP : 216.73.216.46 Web Server : Apache System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : infrafs ( 43850) PHP Version : 8.2.29 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/i/n/f/infrafs/INFRABIKEIT/wp-content/plugins/ |
Upload File : |
Lite/Requirements.php 0000644 00000010255 15133211061 0010631 0 ustar 00 <?php
/**
* Class that collects the functions of initial checks on the requirements to run the plugin
*
* Standard: PSR-2
* @link http://www.php-fig.org/psr/psr-2
*
* @package Duplicator
* @copyright (c) 2021, Snapcreek LLC
*
*/
namespace Duplicator\Lite;
defined('ABSPATH') || exit;
class Requirements
{
const DUP_PRO_PLUGIN_KEY = 'duplicator-pro/duplicator-pro.php';
/**
*
* @var string // current plugin file full path
*/
protected static $pluginFile = '';
/**
*
* @var string // message on deactivation
*/
protected static $deactivationMessage = '';
/**
* This function checks the requirements to run Duplicator.
* At this point WordPress is not yet completely initialized so functionality is limited.
* It need to hook into "admin_init" to get the full functionality of WordPress.
*
* @param string $pluginFile // main plugin file path
* @return boolean // true if plugin can be executed
*/
public static function canRun($pluginFile)
{
$result = true;
self::$pluginFile = $pluginFile;
if ($result === true && self::isPluginActive(self::DUP_PRO_PLUGIN_KEY)) {
add_action('admin_init', array(__CLASS__, 'addProEnableNotice'));
$pluginUrl = (is_multisite() ? network_admin_url('plugins.php') : admin_url('plugins.php'));
self::$deactivationMessage = __('Can\'t enable Duplicator LITE if the PRO version is enabled.', 'duplicator') . '<br/>'
. __('Please deactivate Duplicator PRO, then reactivate LITE version from the ', 'duplicator')
. "<a href='" . $pluginUrl . "'>" . __('plugins page', 'duplicator') . ".</a>";
$result = false;
}
if ($result === false) {
register_activation_hook($pluginFile, array(__CLASS__, 'deactivateOnActivation'));
}
return $result;
}
/**
*
* @param string $plugin
* @return boolean // return true if plugin key is active and plugin file exists
*/
protected static function isPluginActive($plugin)
{
$isActive = false;
if (in_array($plugin, (array) get_option('active_plugins', array()))) {
$isActive = true;
}
if (is_multisite()) {
$plugins = get_site_option('active_sitewide_plugins');
if (isset($plugins[$plugin])) {
$isActive = true;
}
}
return ($isActive && file_exists(WP_PLUGIN_DIR . '/' . $plugin));
}
/**
* display admin notice only if user can manage plugins.
*/
public static function addProEnableNotice()
{
if (current_user_can('activate_plugins')) {
add_action('admin_notices', array(__CLASS__, 'proEnabledNotice'));
}
}
/**
* display admin notice
*/
public static function addMultisiteNotice()
{
if (current_user_can('activate_plugins')) {
add_action('admin_notices', array(__CLASS__, 'multisiteNotice'));
}
}
/**
* deactivate current plugin on activation
*/
public static function deactivateOnActivation()
{
deactivate_plugins(plugin_basename(self::$pluginFile));
wp_die(self::$deactivationMessage);
}
/**
* Display admin notice if duplicator pro is enabled
*/
public static function proEnabledNotice()
{
$pluginUrl = (is_multisite() ? network_admin_url('plugins.php') : admin_url('plugins.php'));
?>
<div class="error notice">
<p>
<span class="dashicons dashicons-warning"></span>
<b><?php _e('Duplicator Notice:', 'duplicator'); ?></b>
<?php _e('The "Duplicator Lite" and "Duplicator Pro" plugins cannot both be active at the same time. ', 'duplicator'); ?>
</p>
<p>
<?php _e('To use "Duplicator LITE" please deactivate "Duplicator PRO" from the ', 'duplicator-pro'); ?>
<a href="<?php echo esc_url($pluginUrl); ?>">
<?php _e('plugins page', 'duplicator'); ?>.
</a>
</p>
</div>
<?php
}
}
DuplicatorPhpVersionCheck.php 0000644 00000004323 15133211061 0012332 0 ustar 00 <?php
/**
* These functions are performed before including any other Duplicator file so
* do not use any Duplicator library or feature and use code compatible with PHP 5.2
*
*/
defined('ABSPATH') || exit;
// In the future it will be included on both PRO and LITE so you need to check if the define exists.
if (!class_exists('DuplicatorPhpVersionCheck')) {
class DuplicatorPhpVersionCheck
{
protected static $minVer = null;
protected static $suggestedVer = null;
public static function check($minVer, $suggestedVer)
{
self::$minVer = $minVer;
self::$suggestedVer = $suggestedVer;
if (version_compare(PHP_VERSION, self::$minVer, '<')) {
if (is_multisite()) {
add_action('network_admin_notices', array(__CLASS__, 'notice'));
} else {
add_action('admin_notices', array(__CLASS__, 'notice'));
}
return false;
} else {
return true;
}
}
public static function notice()
{
?>
<div class="error notice">
<p>
<?php
$str = 'DUPLICATOR: '.__('Your system is running a very old version of PHP (%s) that is no longer supported by Duplicator. ', 'duplicator');
printf($str, PHP_VERSION);
$str = __('Please ask your host or server administrator to update to PHP %1s or greater.') . '<br/>';
$str .= __('If this is not possible, please visit the FAQ link titled ', 'duplicator');
$str .= '<a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-licensing-017-q" target="blank">';
$str .= __('"What version of PHP Does Duplicator Support?"', 'duplicator');
$str .= '</a>';
$str .= __(' for instructions on how to download a previous version of Duplicator compatible with PHP %2s.', 'duplicator');
printf($str, self::$suggestedVer, PHP_VERSION);
?>
</p>
</div>
<?php
}
}
}
diagnostics/information.php 0000644 00000024170 15133306747 0012126 0 ustar 00 <?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
wp_enqueue_script('dup-handlebars');
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/utilities/class.u.scancheck.php');
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/class.io.php');
$installer_files = DUP_Server::getInstallerFiles();
$package_name = (isset($_GET['package'])) ? esc_html($_GET['package']) : '';
$abs_path = duplicator_get_abs_path();
// For auto detect archive file name logic
if (empty($package_name)) {
$installer_file_path = $abs_path . '/' . 'installer.php';
if (file_exists($installer_file_path)) {
$installer_file_data = file_get_contents($installer_file_path);
if (preg_match("/const ARCHIVE_FILENAME = '(.*?)';/", $installer_file_data, $match)) {
$temp_archive_file = esc_html($match[1]);
$temp_archive_file_path = $abs_path . '/' . $temp_archive_file;
if (file_exists($temp_archive_file_path)) {
$package_name = $temp_archive_file;
}
}
}
}
$package_path = empty($package_name) ? '' : $abs_path . '/' . $package_name;
$txt_found = __('File Found: Unable to remove', 'duplicator');
$txt_removed = __('Removed', 'duplicator');
$nonce = wp_create_nonce('duplicator_cleanup_page');
$section = (isset($_GET['section'])) ?$_GET['section']:'';
if ($section == "info" || $section == '') {
$_GET['action'] = isset($_GET['action']) ? $_GET['action'] : 'display';
if (isset($_REQUEST['_wpnonce'])) {
if (($_GET['action'] == 'installer') || ($_GET['action'] == 'tmp-cache')) {
if (! wp_verify_nonce($_REQUEST['_wpnonce'], 'duplicator_cleanup_page')) {
exit; // Get out of here bad nounce!
}
}
}
switch ($_GET['action']) {
case 'installer' :
$action_response = __('Installer file cleanup ran!', 'duplicator');
break;
case 'tmp-cache':
DUP_Package::tempFileCleanup(true);
$action_response = __('Build cache removed.', 'duplicator');
break;
}
if ($_GET['action'] != 'display') : ?>
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box">
<p><b><?php echo esc_html($action_response); ?></b></p>
<?php
if ( $_GET['action'] == 'installer') :
$remove_error = false;
// Move installer log before cleanup
DUP_Util::initSnapshotDirectory();
$installer_log_path = DUPLICATOR_INSTALLER_DIRECTORY.'/dup-installer-log__'.DUPLICATOR_INSTALLER_HASH_PATTERN.'.txt';
$glob_files = glob($installer_log_path);
if (!empty($glob_files)) {
foreach ($glob_files as $glob_file) {
$installer_log_file_path = $glob_file;
DUP_IO::copyFile($installer_log_file_path, DUP_Settings::getSsdirInstallerPath());
}
}
$html = "";
//REMOVE CORE INSTALLER FILES
$installer_files = DUP_Server::getInstallerFiles();
$removed_files = false;
foreach ($installer_files as $filename => $path) {
$file_path = '';
if (stripos($filename, '[hash]') !== false) {
$glob_files = glob($path);
if (!empty($glob_files)) {
if(count($glob_files) > 10) {
throw new Exception('Trying to delete too many files. Please contact Duplicator support.');
}
foreach ($glob_files as $glob_file) {
$file_path = $glob_file;
DUP_IO::deleteFile($file_path);
$removed_files = true;
}
}
} else if (is_file($path)) {
$file_path = $path;
DUP_IO::deleteFile($path);
$removed_files = true;
} else if (is_dir($path)) {
$file_path = $path;
// Extra protection to ensure we only are deleting the installer directory
if(DUP_STR::contains($path, 'dup-installer')) {
DUP_IO::deleteTree($path);
$removed_files = true;
}
}
if (!empty($file_path)) {
if (file_exists($file_path)) {
echo "<div class='failed'><i class='fa fa-exclamation-triangle fa-sm'></i> {$txt_found} - ".esc_html($file_path)." </div>";
$remove_error = true;
} else {
echo "<div class='success'> <i class='fa fa-check'></i> {$txt_removed} - ".esc_html($file_path)." </div>";
}
}
}
//No way to know exact name of archive file except from installer.
//The only place where the package can be removed is from installer
//So just show a message if removing from plugin.
if (file_exists($package_path)) {
$path_parts = pathinfo($package_name);
$path_parts = (isset($path_parts['extension'])) ? $path_parts['extension'] : '';
$valid_ext = ($path_parts == "zip" || $path_parts == "daf");
if ($valid_ext && !is_dir($package_path)) {
$html .= (@unlink($package_path))
? "<div class='success'><i class='fa fa-check'></i> ".esc_html($txt_removed)." - ".esc_html($package_path)."</div>"
: "<div class='failed'><i class='fa fa-exclamation-triangle fa-sm'></i> ".esc_html($txt_found)." - ".esc_html($package_path)."</div>";
}
}
echo $html;
if (!$removed_files) {
echo '<div class="dup-alert-no-files-msg success">'
. '<i class="fa fa-check"></i> <b>' . esc_html__('No Duplicator installer files found on this WordPress Site.', 'duplicator') . '</b>'
. '</div>';
}
?>
<div class="dup-alert-secure-note">
<?php
echo '<b><i class="fa fa-shield-alt"></i> ' . esc_html__('Security Notes', 'duplicator') . ':</b> ';
_e('If the installer files do not successfully get removed with this action, then they WILL need to be removed manually through your hosts control panel '
. 'or FTP. Please remove all installer files to avoid any security issues on this site. For more details please visit '
. 'the FAQ link <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-295-q" target="_blank">Which files need to be removed after an install?</a>', 'duplicator');
echo '<br/><br/>';
if ($remove_error) {
echo __('Some of the installer files did not get removed, ', 'duplicator').
'<a href="#" onclick="Duplicator.Tools.deleteInstallerFiles(); return false;" >'.
__('please retry the installer cleanup process', 'duplicator').
'</a>.'.
__(' If this process continues please see the previous FAQ link.', 'duplicator').
'<br><br>';
}
echo '<b><i class="fa fa-thumbs-up"></i> ' . esc_html__('Help Support Duplicator', 'duplicator') . ':</b> ';
_e('The Duplicator team has worked many years to make moving a WordPress site a much easier process. Show your support with a '
. '<a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="_blank">5 star review</a>! We would be thrilled if you could!', 'duplicator');
?>
</div>
<?php endif; ?>
</div>
<?php endif;
if(isset($_GET['action']) && $_GET['action']=="installer" && get_option("duplicator_exe_safe_mode")){
$safe_title = __('This site has been successfully migrated!');
$safe_msg = __('Please test the entire site to validate the migration process!');
switch(get_option("duplicator_exe_safe_mode")){
//safe_mode basic
case 1:
$safe_msg = __('NOTICE: Safe mode (Basic) was enabled during install, be sure to re-enable all your plugins.');
break;
//safe_mode advance
case 2:
$safe_msg = __('NOTICE: Safe mode (Advanced) was enabled during install, be sure to re-enable all your plugins.');
$temp_theme = null;
$active_theme = wp_get_theme();
$available_themes = wp_get_themes();
foreach($available_themes as $theme){
if($temp_theme == null && $theme->stylesheet != $active_theme->stylesheet){
$temp_theme = array('stylesheet' => $theme->stylesheet, 'template' => $theme->template);
break;
}
}
if($temp_theme != null){
//switch to another theme then backto default
switch_theme($temp_theme['template'], $temp_theme['stylesheet']);
switch_theme($active_theme->template, $active_theme->stylesheet);
}
break;
}
if (! DUP_Server::hasInstallerFiles()) {
echo "<div class='notice notice-success cleanup-notice'><p><b class='title'><i class='fa fa-check-circle'></i> ".esc_html($safe_title)."</b> "
. "<div class='notice-safemode'>".esc_html($safe_msg)."</p></div></div>";
}
delete_option("duplicator_exe_safe_mode");
}
}
?>
<form id="dup-settings-form" action="<?php echo admin_url( 'admin.php?page=duplicator-tools&tab=diagnostics§ion=info' ); ?>" method="post">
<?php wp_nonce_field( 'duplicator_settings_page', '_wpnonce', false ); ?>
<input type="hidden" id="dup-remove-options-value" name="remove-options" value="">
<?php
if (isset($_POST['remove-options'])) {
$remove_options = sanitize_text_field($_POST['remove-options']);
$action_result = DUP_Settings::DeleteWPOption($remove_options);
switch ($remove_options)
{
case 'duplicator_settings' : $remove_response = __('Plugin settings reset.', 'duplicator'); break;
case 'duplicator_ui_view_state' : $remove_response = __('View state settings reset.', 'duplicator'); break;
case 'duplicator_package_active' : $remove_response = __('Active package settings reset.', 'duplicator'); break;
}
}
if (! empty($remove_response)) {
echo "<div id='message' class='notice notice-success is-dismissible dup-wpnotice-box'><p>".esc_html($remove_response)."</p></div>";
}
include_once 'inc.data.php';
include_once 'inc.settings.php';
include_once 'inc.validator.php';
include_once 'inc.phpinfo.php';
?>
</form>
diagnostics/logging.php 0000644 00000020276 15133306747 0011232 0 ustar 00 <?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
function _duplicatorSortFiles($a,$b) {
return filemtime($b) - filemtime($a);
}
$logs = glob(DUP_Settings::getSsdirPath() . '/*.log') ;
if ($logs != false && count($logs)) {
usort($logs, '_duplicatorSortFiles');
@chmod(DUP_Util::safePath($logs[0]), 0644);
}
$logname = (isset($_GET['logname'])) ? trim(sanitize_text_field($_GET['logname'])) : "";
$refresh = (isset($_POST['refresh']) && $_POST['refresh'] == 1) ? 1 : 0;
$auto = (isset($_POST['auto']) && $_POST['auto'] == 1) ? 1 : 0;
//Check for invalid file
if (!empty($logname))
{
$validFiles = array_map('basename', $logs);
if (validate_file($logname, $validFiles) > 0) {
unset($logname);
}
unset($validFiles);
}
if (!isset($logname) || !$logname) {
$logname = (count($logs) > 0) ? basename($logs[0]) : "";
}
$logurl = DUP_Settings::getSsdirUrl().'/'.$logname;
$logfound = (strlen($logname) > 0) ? true : false;
?>
<style>
div#dup-refresh-count {display: inline-block}
table#dup-log-panels {width:100%; }
td#dup-log-panel-left {width:75%;}
td#dup-log-panel-left div.name {float:left; margin: 0px 0px 5px 5px;}
td#dup-log-panel-left div.opts {float:right;}
td#dup-log-panel-right {vertical-align: top; padding-left:15px; max-width: 375px}
#dup-log-content {
padding:5px;
background: #fff;
min-height:500px;
width: calc(100vw - 630px);;
border:1px solid silver;
overflow:scroll;
word-wrap: break-word;
margin:0;
line-height: 2;
}
/* OPTIONS */
div.dup-log-hdr {font-weight: bold; font-size:16px; padding:2px; }
div.dup-log-hdr small{font-weight:normal; font-style: italic}
div.dup-log-file-list {font-family:monospace;}
div.dup-log-file-list a, span.dup-log{display: inline-block; white-space: nowrap; text-overflow: ellipsis; max-width: 375px; overflow:hidden}
div.dup-log-file-list span {color:green}
div.dup-opts-items {border:1px solid silver; background: #efefef; padding: 5px; border-radius: 4px; margin:2px 0px 10px -2px;}
label#dup-auto-refresh-lbl {display: inline-block;}
</style>
<script>
jQuery(document).ready(function($)
{
Duplicator.Tools.FullLog = function() {
var $panelL = $('#dup-log-panel-left');
var $panelR = $('#dup-log-panel-right');
if ($panelR.is(":visible") ) {
$panelR.hide(400);
$panelL.css({width: '100%'});
} else {
$panelR.show(200);
$panelL.css({width: '75%'});
}
}
Duplicator.Tools.Refresh = function() {
$('#refresh').val(1);
$('#dup-form-logs').submit();
}
Duplicator.Tools.RefreshAuto = function() {
if ( $("#dup-auto-refresh").is(":checked")) {
$('#auto').val(1);
startTimer();
} else {
$('#auto').val(0);
}
}
Duplicator.Tools.GetLog = function(log) {
window.location = log;
}
Duplicator.Tools.WinResize = function() {
var height = $(window).height() - 225;
$("#dup-log-content").css({height: height + 'px'});
}
Duplicator.Tools.readLogfile = function() {
$.get(<?php echo str_replace('\\/', '/', json_encode($logurl)); ?>, function(data) {
$('#dup-log-content').text(data);
}, 'text');
};
var duration = 10;
var count = duration;
var timerInterval;
function timer() {
count = count - 1;
$("#dup-refresh-count").html(count.toString());
if (! $("#dup-auto-refresh").is(":checked")) {
clearInterval(timerInterval);
$("#dup-refresh-count").text(count.toString().trim());
return;
}
if (count <= 0) {
count = duration + 1;
Duplicator.Tools.Refresh();
}
}
function startTimer() {
timerInterval = setInterval(timer, 1000);
}
//INIT Events
$(window).resize(Duplicator.Tools.WinResize);
$('#dup-options').click(Duplicator.Tools.FullLog);
$("#dup-refresh").click(Duplicator.Tools.Refresh);
$("#dup-auto-refresh").click(Duplicator.Tools.RefreshAuto);
$("#dup-refresh-count").html(duration.toString());
// READ LOG FILE
Duplicator.Tools.readLogfile();
//INIT
Duplicator.Tools.WinResize();
<?php if ($refresh) : ?>
//Scroll to Bottom
$("#dup-log-content").load(function () {
var $contents = $('#dup-log-content').contents();
$contents.scrollTop($contents.height());
});
<?php if ($auto) : ?>
$("#dup-auto-refresh").prop('checked', true);
Duplicator.Tools.RefreshAuto();
<?php endif; ?>
<?php endif; ?>
});
</script>
<form id="dup-form-logs" method="post" action="">
<input type="hidden" id="refresh" name="refresh" value="<?php echo ($refresh) ? 1 : 0 ?>" />
<input type="hidden" id="auto" name="auto" value="<?php echo ($auto) ? 1 : 0 ?>" />
<?php if (! $logfound) : ?>
<div style="padding:20px">
<h2><?php esc_html_e("Log file not found or unreadable", 'duplicator') ?>.</h2>
<?php esc_html_e("Try to create a package, since no log files were found in the snapshots directory with the extension *.log", 'duplicator') ?>.<br/><br/>
<?php esc_html_e("Reasons for log file not showing", 'duplicator') ?>: <br/>
- <?php esc_html_e("The web server does not support returning .log file extentions", 'duplicator') ?>. <br/>
- <?php esc_html_e("The snapshots directory does not have the correct permissions to write files. Try setting the permissions to 755", 'duplicator') ?>. <br/>
- <?php esc_html_e("The process that PHP runs under does not have enough permissions to create files. Please contact your hosting provider for more details", 'duplicator') ?>. <br/>
</div>
<?php else: ?>
<table id="dup-log-panels">
<tr>
<td id="dup-log-panel-left">
<div class="name">
<i class='fas fa-file-contract fa-fw'></i> <b><?php echo basename($logurl); ?></b> |
<i style="cursor: pointer"
data-tooltip-title="<?php esc_attr_e("Host Recommendation:", 'duplicator'); ?>"
data-tooltip="<?php esc_attr_e('Duplicator recommends going with the high performance pro plan or better from our recommended list', 'duplicator'); ?>">
<i class="far fa-lightbulb" aria-hidden="true"></i>
<?php
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
esc_html__("Consider our recommended", 'duplicator'),
esc_html__("host list", 'duplicator'),
esc_html__("if you’re unhappy with your current provider", 'duplicator'));
?>
</i>
</div>
<div class="opts"><a href="javascript:void(0)" id="dup-options"><?php esc_html_e("Options", 'duplicator') ?> <i class="fa fa-angle-double-right"></i></a> </div>
<br style="clear:both" />
<pre id="dup-log-content"></pre>
</td>
<td id="dup-log-panel-right">
<h2><?php esc_html_e("Options", 'duplicator') ?> </h2>
<div class="dup-opts-items">
<input type="button" class="button button-small" id="dup-refresh" value="<?php esc_attr_e("Refresh", 'duplicator') ?>" />
<input type='checkbox' id="dup-auto-refresh" style="margin-top:1px" />
<label id="dup-auto-refresh-lbl" for="dup-auto-refresh">
<?php esc_attr_e("Auto Refresh", 'duplicator') ?>
[<div id="dup-refresh-count"></div>]
</label>
</div>
<div class="dup-log-hdr">
<?php esc_html_e("Package Logs", 'duplicator') ?>
<small><?php esc_html_e("Top 20", 'duplicator') ?></small>
</div>
<div class="dup-log-file-list">
<?php
$count=0;
$active = basename($logurl);
foreach ($logs as $log) {
$time = date('m/d/y h:i:s', filemtime($log));
$name = basename($log);
$url = '?page=duplicator-tools&tab=diagnostics§ion=log&logname=' . esc_html($name);
echo ($active == $name)
? "<span class='dup-log' title='".esc_attr($name)."'>".esc_html($time)."-".esc_html($name)."</span>"
: "<a href='javascript:void(0)' title='".esc_attr($name)."' onclick='Duplicator.Tools.GetLog(\"".esc_js($url)."\")'>".esc_html($time)."-".esc_html($name)."</a>";
if ($count > 20) break;
}
?>
</div>
</td>
</tr>
</table>
<?php endif; ?>
</form>
diagnostics/inc.settings.php 0000644 00000022365 15133306747 0012215 0 ustar 00 <?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
$dbvar_maxtime = DUP_DB::getVariable('wait_timeout');
$dbvar_maxpacks = DUP_DB::getVariable('max_allowed_packet');
$dbvar_maxtime = is_null($dbvar_maxtime) ? __("unknow", 'duplicator') : $dbvar_maxtime;
$dbvar_maxpacks = is_null($dbvar_maxpacks) ? __("unknow", 'duplicator') : $dbvar_maxpacks;
$abs_path = duplicator_get_abs_path();
$space = @disk_total_space($abs_path);
$space_free = @disk_free_space($abs_path);
$perc = @round((100/$space)*$space_free,2);
$mysqldumpPath = DUP_DB::getMySqlDumpPath();
$mysqlDumpSupport = ($mysqldumpPath) ? $mysqldumpPath : 'Path Not Found';
$client_ip_address = DUP_Server::getClientIP();
$error_log_path = ini_get('error_log');
?>
<!-- ==============================
SERVER SETTINGS -->
<div class="dup-box">
<div class="dup-box-title">
<i class="fas fa-tachometer-alt"></i>
<?php esc_html_e("Server Settings", 'duplicator') ?>
<div class="dup-box-arrow"></div>
</div>
<div class="dup-box-panel" id="dup-settings-diag-srv-panel" style="<?php echo esc_html($ui_css_srv_panel); ?>">
<table class="widefat" cellspacing="0">
<tr>
<td class='dup-settings-diag-header' colspan="2"><?php esc_html_e("General", 'duplicator'); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Duplicator Version", 'duplicator'); ?></td>
<td>
<?php echo esc_html(DUPLICATOR_VERSION); ?> -
<?php echo esc_html(DUPLICATOR_VERSION_BUILD); ?>
</td>
</tr>
<tr>
<td><?php esc_html_e("Operating System", 'duplicator'); ?></td>
<td><?php echo esc_html(PHP_OS) ?></td>
</tr>
<tr>
<td><?php esc_html_e("Timezone", 'duplicator'); ?></td>
<td><?php echo esc_html(date_default_timezone_get()); ?> <small><i>This is a <a href='options-general.php'>WordPress setting</a></i></small></td>
</tr>
<tr>
<td><?php esc_html_e("Server Time", 'duplicator'); ?></td>
<td><?php echo date("Y-m-d H:i:s"); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Web Server", 'duplicator'); ?></td>
<td><?php echo esc_html($_SERVER['SERVER_SOFTWARE']); ?></td>
</tr>
<?php
$abs_path = duplicator_get_abs_path();
?>
<tr>
<td><?php esc_html_e("Root Path", 'duplicator'); ?></td>
<td><?php echo esc_html($abs_path); ?></td>
</tr>
<tr>
<td><?php esc_html_e("ABSPATH", 'duplicator'); ?></td>
<td><?php echo esc_html($abs_path); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Plugins Path", 'duplicator'); ?></td>
<td><?php echo esc_html(DUP_Util::safePath(WP_PLUGIN_DIR)); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Loaded PHP INI", 'duplicator'); ?></td>
<td><?php echo esc_html(php_ini_loaded_file()); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Server IP", 'duplicator'); ?></td>
<?php
if (isset($_SERVER['SERVER_ADDR'])) {
$server_address = $_SERVER['SERVER_ADDR'];
} elseif (isset($_SERVER['SERVER_NAME']) && function_exists('gethostbyname')) {
$server_address = gethostbyname($_SERVER['SERVER_NAME']);
} else {
$server_address = __("Can't detect", 'duplicator');
}
?>
<td><?php echo esc_html($server_address); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Client IP", 'duplicator'); ?></td>
<td><?php echo esc_html($client_ip_address);?></td>
</tr>
<tr>
<td class='dup-settings-diag-header' colspan="2">WordPress</td>
</tr>
<tr>
<td><?php esc_html_e("Version", 'duplicator'); ?></td>
<td><?php echo esc_html($wp_version); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Language", 'duplicator'); ?></td>
<td><?php bloginfo('language'); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Charset", 'duplicator'); ?></td>
<td><?php bloginfo('charset'); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Memory Limit ", 'duplicator'); ?></td>
<td><?php echo esc_html(WP_MEMORY_LIMIT); ?> (<?php esc_html_e("Max", 'duplicator'); echo ' ' . esc_html(WP_MAX_MEMORY_LIMIT); ?>)</td>
</tr>
<tr>
<td class='dup-settings-diag-header' colspan="2">PHP</td>
</tr>
<tr>
<td><?php esc_html_e("Version", 'duplicator'); ?></td>
<td><?php echo esc_html(phpversion()); ?></td>
</tr>
<tr>
<td>SAPI</td>
<td><?php echo esc_html(PHP_SAPI); ?></td>
</tr>
<tr>
<td><?php esc_html_e("User", 'duplicator'); ?></td>
<td><?php echo DUP_Util::getCurrentUser(); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Process", 'duplicator'); ?></td>
<td><?php echo esc_html(DUP_Util::getProcessOwner()); ?></td>
</tr>
<tr>
<td><a href="http://php.net/manual/en/features.safe-mode.php" target="_blank"><?php esc_html_e("Safe Mode", 'duplicator'); ?></a></td>
<td>
<?php echo (((strtolower(@ini_get('safe_mode')) == 'on') || (strtolower(@ini_get('safe_mode')) == 'yes') ||
(strtolower(@ini_get('safe_mode')) == 'true') || (ini_get("safe_mode") == 1 )))
? esc_html__('On', 'duplicator') : esc_html__('Off', 'duplicator');
?>
</td>
</tr>
<tr>
<td><a href="http://www.php.net/manual/en/ini.core.php#ini.memory-limit" target="_blank"><?php esc_html_e("Memory Limit", 'duplicator'); ?></a></td>
<td><?php echo @ini_get('memory_limit') ?></td>
</tr>
<tr>
<td><?php esc_html_e("Memory In Use", 'duplicator'); ?></td>
<td><?php echo size_format(@memory_get_usage(TRUE), 2) ?></td>
</tr>
<tr>
<td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php esc_html_e("Max Execution Time", 'duplicator'); ?></a></td>
<td>
<?php
echo @ini_get('max_execution_time');
$try_update = set_time_limit(0);
$try_update = $try_update ? 'is dynamic' : 'value is fixed';
echo " (default) - {$try_update}";
?>
<i class="fa fa-question-circle data-size-help"
data-tooltip-title="<?php esc_attr_e("Max Execution Time", 'duplicator'); ?>"
data-tooltip="<?php esc_attr_e('If the value shows dynamic then this means its possible for PHP to run longer than the default. '
. 'If the value is fixed then PHP will not be allowed to run longer than the default.', 'duplicator'); ?>"></i>
</td>
</tr>
<tr>
<td><a href="http://us3.php.net/shell_exec" target="_blank"><?php esc_html_e("Shell Exec", 'duplicator'); ?></a></td>
<td><?php echo (DUP_Util::hasShellExec()) ? esc_html__("Is Supported", 'duplicator') : esc_html__("Not Supported", 'duplicator'); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Shell Exec Zip", 'duplicator'); ?></td>
<td><?php echo (DUP_Util::getZipPath() != null) ? esc_html__("Is Supported", 'duplicator') : esc_html__("Not Supported", 'duplicator'); ?></td>
</tr>
<tr>
<td><a href="https://suhosin.org/stories/index.html" target="_blank"><?php esc_html_e("Suhosin Extension", 'duplicator'); ?></a></td>
<td><?php echo extension_loaded('suhosin') ? esc_html__("Enabled", 'duplicator') : esc_html__("Disabled", 'duplicator'); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Architecture ", 'duplicator'); ?></td>
<td>
<?php echo DUP_Util::getArchitectureString(); ?>
</td>
</tr>
<tr>
<td><?php esc_html_e("Error Log File ", 'duplicator'); ?></td>
<td><?php echo esc_html($error_log_path); ?></td>
</tr>
<tr>
<td class='dup-settings-diag-header' colspan="2">MySQL</td>
</tr>
<tr>
<td><?php esc_html_e("Version", 'duplicator'); ?></td>
<td><?php echo esc_html(DUP_DB::getVersion()); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Comments", 'duplicator'); ?></td>
<td><?php echo esc_html(DUP_DB::getVariable('version_comment')); ?></td>
</tr>
<tr>
<td><?php esc_html_e("Charset", 'duplicator'); ?></td>
<td><?php echo defined('DB_CHARSET') ? DB_CHARSET : 'DB_CHARSET not set' ; ?></td>
</tr>
<tr>
<td><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout" target="_blank"><?php esc_html_e("Wait Timeout", 'duplicator'); ?></a></td>
<td><?php echo esc_html($dbvar_maxtime); ?></td>
</tr>
<tr>
<td style="white-space:nowrap"><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_allowed_packet" target="_blank"><?php esc_html_e("Max Allowed Packets", 'duplicator'); ?></a></td>
<td><?php echo esc_html($dbvar_maxpacks); ?></td>
</tr>
<tr>
<td><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html" target="_blank"><?php esc_html_e("msyqldump Path", 'duplicator'); ?></a></td>
<td><?php echo esc_html($mysqlDumpSupport); ?></td>
</tr>
<tr>
<td class='dup-settings-diag-header' colspan="2"><?php esc_html_e("Server Disk", 'duplicator'); ?></td>
</tr>
<tr valign="top">
<td><?php esc_html_e('Free space', 'hyper-cache'); ?></td>
<td><?php echo esc_html($perc);?>% -- <?php echo esc_html(DUP_Util::byteSize($space_free));?> from <?php echo esc_html(DUP_Util::byteSize($space));?><br/>
<small>
<?php esc_html_e("Note: This value is the physical servers hard-drive allocation.", 'duplicator'); ?> <br/>
<?php esc_html_e("On shared hosts check your control panel for the 'TRUE' disk space quota value.", 'duplicator'); ?>
</small>
</td>
</tr>
</table><br/>
</div> <!-- end .dup-box-panel -->
</div> <!-- end .dup-box -->
<br/>