Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wordfenc.../lib
File: menu_tools_diagnostic.php
<div class="wf-block-content wf-clearfix wf-padding-no-left wf-padding-no-right">
[500] Fix | Delete
<table class="wf-striped-table"<?php echo !empty($inEmail) ? ' border=1' : '' ?>>
[501] Fix | Delete
<tbody>
[502] Fix | Delete
<?php
[503] Fix | Delete
$cron = _get_cron_array();
[504] Fix | Delete
[505] Fix | Delete
foreach ($cron as $timestamp => $values) {
[506] Fix | Delete
if (is_array($values)) {
[507] Fix | Delete
foreach ($values as $cron_job => $v) {
[508] Fix | Delete
if (is_numeric($timestamp)) {
[509] Fix | Delete
$overdue = ((time() - 1800) > $timestamp);
[510] Fix | Delete
?>
[511] Fix | Delete
<tr<?php echo $overdue ? ' class="wf-overdue-cron"' : ''; ?>>
[512] Fix | Delete
<td><?php echo esc_html(date('r', $timestamp)) . ($overdue ? ' <strong>(' . esc_html__('Overdue', 'wordfence') . ')</strong>' : '') ?></td>
[513] Fix | Delete
<td><?php echo esc_html($cron_job) ?></td>
[514] Fix | Delete
</tr>
[515] Fix | Delete
<?php
[516] Fix | Delete
}
[517] Fix | Delete
}
[518] Fix | Delete
}
[519] Fix | Delete
}
[520] Fix | Delete
?>
[521] Fix | Delete
</tbody>
[522] Fix | Delete
</table>
[523] Fix | Delete
</div>
[524] Fix | Delete
</div>
[525] Fix | Delete
[526] Fix | Delete
<?php
[527] Fix | Delete
global $wpdb;
[528] Fix | Delete
$wfdb = new wfDB();
[529] Fix | Delete
//This must be done this way because MySQL with InnoDB tables does a full regeneration of all metadata if we don't. That takes a long time with a large table count.
[530] Fix | Delete
$tables = $wfdb->querySelect('SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() ORDER BY TABLE_NAME ASC LIMIT 250');
[531] Fix | Delete
$total = $wfdb->querySingle('SELECT COUNT(*) FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE()');
[532] Fix | Delete
foreach ($tables as &$t) {
[533] Fix | Delete
$t = "'" . esc_sql($t['TABLE_NAME']) . "'";
[534] Fix | Delete
}
[535] Fix | Delete
unset($t);
[536] Fix | Delete
$q = $wfdb->querySelect("SHOW TABLE STATUS WHERE Name IN (" . implode(',', $tables) . ')');
[537] Fix | Delete
if ($q):
[538] Fix | Delete
$databaseCols = count($q[0]);
[539] Fix | Delete
?>
[540] Fix | Delete
<div class="wf-block<?php echo(wfPersistenceController::shared()->isActive('wf-diagnostics-database-tables') ? ' wf-active' : '') ?>" data-persistence-key="<?php echo esc_attr('wf-diagnostics-database-tables') ?>">
[541] Fix | Delete
<div class="wf-block-header">
[542] Fix | Delete
<div class="wf-block-header-content">
[543] Fix | Delete
<div class="wf-block-title">
[544] Fix | Delete
<strong><?php esc_html_e('Database Tables', 'wordfence') ?></strong>
[545] Fix | Delete
<span class="wf-text-small"><?php esc_html_e('Database table names, sizes, timestamps, and other metadata.', 'wordfence') ?></span>
[546] Fix | Delete
</div>
[547] Fix | Delete
<div class="wf-block-header-action">
[548] Fix | Delete
<div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive('wf-diagnostics-database-tables') ? 'true' : 'false'); ?>" tabindex="0"></div>
[549] Fix | Delete
</div>
[550] Fix | Delete
</div>
[551] Fix | Delete
</div>
[552] Fix | Delete
<div class="wf-block-content wf-clearfix wf-padding-no-left wf-padding-no-right">
[553] Fix | Delete
<ul class="wf-block-list wf-padding-add-left-large wf-padding-add-right-large">
[554] Fix | Delete
<li>
[555] Fix | Delete
<div style="width: 75%; min-width: 300px;"><?php esc_html_e('Wordfence Table Check', 'wordfence'); ?></div>
[556] Fix | Delete
<div class="wf-right">
[557] Fix | Delete
<?php if ($total > 250): ?>
[558] Fix | Delete
<div class="wf-result-info"><?php esc_html_e('Unable to verify - table count too high', 'wordfence'); ?></div>
[559] Fix | Delete
<?php else:
[560] Fix | Delete
$hasAll = true;
[561] Fix | Delete
$schemaTables = wfSchema::tableList();
[562] Fix | Delete
$existingTables = wfUtils::array_column($q, 'Name');
[563] Fix | Delete
if (WFWAF_IS_WINDOWS) { $existingTables = wfUtils::array_strtolower($existingTables); } //Windows MySQL installations are case-insensitive
[564] Fix | Delete
$missingTables = array();
[565] Fix | Delete
foreach ($schemaTables as $t) {
[566] Fix | Delete
$table = wfDB::networkTable($t);
[567] Fix | Delete
if (WFWAF_IS_WINDOWS) { $table = strtolower($table); }
[568] Fix | Delete
if (!in_array($table, $existingTables)) {
[569] Fix | Delete
$hasAll = false;
[570] Fix | Delete
$missingTables[] = $t;
[571] Fix | Delete
}
[572] Fix | Delete
}
[573] Fix | Delete
[574] Fix | Delete
foreach (
[575] Fix | Delete
array(
[576] Fix | Delete
\WordfenceLS\Controller_DB::TABLE_2FA_SECRETS,
[577] Fix | Delete
\WordfenceLS\Controller_DB::TABLE_SETTINGS,
[578] Fix | Delete
) as $t) {
[579] Fix | Delete
$table = \WordfenceLS\Controller_DB::network_table($t);
[580] Fix | Delete
if (!in_array($table, $existingTables)) {
[581] Fix | Delete
$hasAll = false;
[582] Fix | Delete
$missingTables[] = $t;
[583] Fix | Delete
}
[584] Fix | Delete
}
[585] Fix | Delete
[586] Fix | Delete
if ($hasAll): ?>
[587] Fix | Delete
<div class="wf-result-success"><?php esc_html_e('All Tables Exist', 'wordfence'); ?></div>
[588] Fix | Delete
<?php else: ?>
[589] Fix | Delete
<div class="wf-result-error"><?php echo esc_html(sprintf(
[590] Fix | Delete
/* translators: 1. WordPress table prefix. 2. Wordfence table case. 3. List of database tables. */
[591] Fix | Delete
__('Tables missing (prefix %1$s, %2$s): %3$s', 'wordfence'), wfDB::networkPrefix(), wfSchema::usingLowercase() ? __('lowercase', 'wordfence') : __('regular case', 'wordfence'), implode(', ', $missingTables))); ?></div>
[592] Fix | Delete
<?php endif; ?>
[593] Fix | Delete
<?php endif; ?>
[594] Fix | Delete
</div>
[595] Fix | Delete
</li>
[596] Fix | Delete
<li style="border-bottom: 1px solid #e2e2e2;">
[597] Fix | Delete
<div style="width: 75%; min-width: 300px;"><?php esc_html_e('Number of Database Tables', 'wordfence'); ?></div>
[598] Fix | Delete
<div class="wf-right">
[599] Fix | Delete
<div class="wf-result-info"><?php echo esc_html( $total ); ?></div>
[600] Fix | Delete
</div>
[601] Fix | Delete
</li>
[602] Fix | Delete
</ul>
[603] Fix | Delete
<div class="wf-add-top-large" style="max-width: 100%; overflow: auto; padding: 1px;">
[604] Fix | Delete
<table class="wf-striped-table"<?php echo !empty($inEmail) ? ' border=1' : '' ?>>
[605] Fix | Delete
<tbody class="thead thead-subhead" style="font-size: 85%">
[606] Fix | Delete
<?php
[607] Fix | Delete
$val = wfUtils::array_first($q);
[608] Fix | Delete
$actualKeyOrder = array_keys($val);
[609] Fix | Delete
$preferredKeyOrder = array('Name', 'Comment', 'Engine', 'Rows', 'Avg_row_length', 'Data_length', 'Index_length', 'Auto_increment', 'Create_time', 'Row_format', 'Collation', 'Version', 'Max_data_length', 'Data_free', 'Update_time', 'Check_time', 'Checksum', 'Create_options');
[610] Fix | Delete
$leftoverKeys = array();
[611] Fix | Delete
$displayKeyOrder = array();
[612] Fix | Delete
foreach ($preferredKeyOrder as $k) {
[613] Fix | Delete
if (in_array($k, $actualKeyOrder)) {
[614] Fix | Delete
$displayKeyOrder[] = $k;
[615] Fix | Delete
}
[616] Fix | Delete
}
[617] Fix | Delete
[618] Fix | Delete
$diff = array_diff($actualKeyOrder, $preferredKeyOrder);
[619] Fix | Delete
$displayKeyOrder = array_merge($displayKeyOrder, $diff);
[620] Fix | Delete
[621] Fix | Delete
?>
[622] Fix | Delete
<tr>
[623] Fix | Delete
<?php foreach ($displayKeyOrder as $tkey): ?>
[624] Fix | Delete
<th><?php echo esc_html($tkey) ?></th>
[625] Fix | Delete
<?php endforeach; ?>
[626] Fix | Delete
</tr>
[627] Fix | Delete
</tbody>
[628] Fix | Delete
<tbody style="font-size: 85%">
[629] Fix | Delete
<?php
[630] Fix | Delete
$count = 0;
[631] Fix | Delete
foreach ($q as $val) {
[632] Fix | Delete
?>
[633] Fix | Delete
<tr>
[634] Fix | Delete
<?php foreach ($displayKeyOrder as $tkey): ?>
[635] Fix | Delete
<td><?php if (isset($val[$tkey])) { echo esc_html($val[$tkey]); } ?></td>
[636] Fix | Delete
<?php endforeach; ?>
[637] Fix | Delete
</tr>
[638] Fix | Delete
<?php
[639] Fix | Delete
$count++;
[640] Fix | Delete
if ($count >= 250 && $total > $count) {
[641] Fix | Delete
?>
[642] Fix | Delete
<tr>
[643] Fix | Delete
<td colspan="<?php echo $databaseCols; ?>"><?php echo esc_html(sprintf(/* translators: Row/record count. */ __('and %d more', 'wordfence'), $total - $count)); ?></td>
[644] Fix | Delete
</tr>
[645] Fix | Delete
<?php
[646] Fix | Delete
break;
[647] Fix | Delete
}
[648] Fix | Delete
}
[649] Fix | Delete
?>
[650] Fix | Delete
</tbody>
[651] Fix | Delete
[652] Fix | Delete
</table>
[653] Fix | Delete
</div>
[654] Fix | Delete
[655] Fix | Delete
</div>
[656] Fix | Delete
</div>
[657] Fix | Delete
<?php endif ?>
[658] Fix | Delete
<div class="wf-block<?php echo(wfPersistenceController::shared()->isActive('wf-diagnostics-log-files') ? ' wf-active' : '') ?>" data-persistence-key="<?php echo esc_attr('wf-diagnostics-log-files') ?>">
[659] Fix | Delete
<div class="wf-block-header">
[660] Fix | Delete
<div class="wf-block-header-content">
[661] Fix | Delete
<div class="wf-block-title">
[662] Fix | Delete
<strong><?php esc_html_e('Log Files', 'wordfence') ?></strong>
[663] Fix | Delete
<span class="wf-text-small"><?php esc_html_e('PHP error logs generated by your site, if enabled by your host.', 'wordfence') ?></span>
[664] Fix | Delete
</div>
[665] Fix | Delete
<div class="wf-block-header-action">
[666] Fix | Delete
<div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive('wf-diagnostics-log-files') ? 'true' : 'false'); ?>" tabindex="0"></div>
[667] Fix | Delete
</div>
[668] Fix | Delete
</div>
[669] Fix | Delete
</div>
[670] Fix | Delete
<div class="wf-block-content wf-clearfix wf-padding-no-left wf-padding-no-right">
[671] Fix | Delete
<div style="max-width: 100%; overflow: auto; padding: 1px;">
[672] Fix | Delete
<table class="wf-striped-table"<?php echo !empty($inEmail) ? ' border=1' : '' ?>>
[673] Fix | Delete
<tbody class="thead thead-subhead" style="font-size: 85%">
[674] Fix | Delete
<tr>
[675] Fix | Delete
<th><?php esc_html_e('File', 'wordfence'); ?></th>
[676] Fix | Delete
<th><?php esc_html_e('Download', 'wordfence'); ?></th>
[677] Fix | Delete
</tr>
[678] Fix | Delete
</tbody>
[679] Fix | Delete
<tbody style="font-size: 85%">
[680] Fix | Delete
<?php
[681] Fix | Delete
$errorLogs = wfErrorLogHandler::getErrorLogs();
[682] Fix | Delete
if (count($errorLogs) < 1): ?>
[683] Fix | Delete
<tr>
[684] Fix | Delete
<td colspan="2"><em><?php esc_html_e('No log files found.', 'wordfence'); ?></em></td>
[685] Fix | Delete
</tr>
[686] Fix | Delete
<?php else:
[687] Fix | Delete
foreach ($errorLogs as $log => $readable): ?>
[688] Fix | Delete
<?php
[689] Fix | Delete
$metadata = array();
[690] Fix | Delete
if (is_callable('filesize')) {
[691] Fix | Delete
$rawSize = @filesize($log);
[692] Fix | Delete
if ($rawSize !== false) {
[693] Fix | Delete
$metadata[] = wfUtils::formatBytes(filesize($log));
[694] Fix | Delete
}
[695] Fix | Delete
}
[696] Fix | Delete
[697] Fix | Delete
if (is_callable('lstat')) {
[698] Fix | Delete
$rawStat = @lstat($log);
[699] Fix | Delete
if (is_array($rawStat) && isset($rawStat['mtime'])) {
[700] Fix | Delete
$ts = $rawStat['mtime'];
[701] Fix | Delete
$utc = new DateTimeZone('UTC');
[702] Fix | Delete
$dtStr = gmdate("c", (int) $ts); //Have to do it this way because of PHP 5.2
[703] Fix | Delete
$dt = new DateTime($dtStr, $utc);
[704] Fix | Delete
$metadata[] = $dt->format('M j, Y G:i:s') . ' ' . __('UTC', 'wordfence');
[705] Fix | Delete
}
[706] Fix | Delete
}
[707] Fix | Delete
[708] Fix | Delete
$shortLog = $log;
[709] Fix | Delete
if (strpos($shortLog, ABSPATH) === 0) {
[710] Fix | Delete
$shortLog = '~/' . substr($shortLog, strlen(ABSPATH));
[711] Fix | Delete
}
[712] Fix | Delete
?>
[713] Fix | Delete
<tr>
[714] Fix | Delete
<td style="width: 100%"><?php echo esc_html($shortLog); if (!empty($metadata)) { echo ' (' . esc_html(implode(', ', $metadata)) . ')'; } ?></td>
[715] Fix | Delete
<td style="white-space: nowrap; text-align: right;"><?php echo($readable ? '<a href="#" data-logfile="' . esc_attr($log) . '" class="downloadLogFile" target="_blank" rel="noopener noreferrer" role="button">' . esc_html__('Download', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>' : '<em>' . esc_html__('Requires downloading from the server directly', 'wordfence') . '</em>'); ?></td>
[716] Fix | Delete
</tr>
[717] Fix | Delete
<?php endforeach;
[718] Fix | Delete
endif; ?>
[719] Fix | Delete
</tbody>
[720] Fix | Delete
[721] Fix | Delete
</table>
[722] Fix | Delete
</div>
[723] Fix | Delete
</div>
[724] Fix | Delete
</div>
[725] Fix | Delete
</div>
[726] Fix | Delete
[727] Fix | Delete
<?php
[728] Fix | Delete
if (!empty($inEmail)) {
[729] Fix | Delete
echo '<h1>' . esc_html__('Scan Issues', 'wordfence') . "</h1>\n";
[730] Fix | Delete
$issues = wfIssues::shared()->getIssues(0, 50, 0, 50);
[731] Fix | Delete
$issueCounts = array_merge(array('new' => 0, 'ignoreP' => 0, 'ignoreC' => 0), wfIssues::shared()->getIssueCounts());
[732] Fix | Delete
$issueTypes = wfIssues::validIssueTypes();
[733] Fix | Delete
[734] Fix | Delete
echo '<h2>' . esc_html(sprintf(/* translators: Number of scan issues. */ __('New Issues (%d total)', 'wordfence'), $issueCounts['new'])) . "</h2>\n";
[735] Fix | Delete
if (isset($issues['new']) && count($issues['new'])) {
[736] Fix | Delete
foreach ($issues['new'] as $i) {
[737] Fix | Delete
if (!in_array($i['type'], $issueTypes)) {
[738] Fix | Delete
continue;
[739] Fix | Delete
}
[740] Fix | Delete
[741] Fix | Delete
$viewContent = '';
[742] Fix | Delete
try {
[743] Fix | Delete
$viewContent = wfView::create('scanner/issue-' . $i['type'], array('textOutput' => $i))->render();
[744] Fix | Delete
}
[745] Fix | Delete
catch (wfViewNotFoundException $e) {
[746] Fix | Delete
//Ignore -- should never happen since we validate the type
[747] Fix | Delete
}
[748] Fix | Delete
[749] Fix | Delete
if (!empty($viewContent)) {
[750] Fix | Delete
echo nl2br($viewContent) . "<br><br>\n";
[751] Fix | Delete
}
[752] Fix | Delete
}
[753] Fix | Delete
}
[754] Fix | Delete
else {
[755] Fix | Delete
echo '<h1>' . esc_html__('No New Issues', 'wordfence') . "</h1>\n";
[756] Fix | Delete
}
[757] Fix | Delete
}
[758] Fix | Delete
?>
[759] Fix | Delete
[760] Fix | Delete
<?php if (!empty($inEmail)): ?>
[761] Fix | Delete
<div class="wf-diagnostics-wrapper">
[762] Fix | Delete
<div class="wf-block<?php echo(wfPersistenceController::shared()->isActive('wf-diagnostics-wordfence-settings') ? ' wf-active' : '') ?>" data-persistence-key="<?php echo esc_attr('wf-diagnostics-wordfence-settings') ?>">
[763] Fix | Delete
<div class="wf-block-header">
[764] Fix | Delete
<div class="wf-block-header-content">
[765] Fix | Delete
<div class="wf-block-title">
[766] Fix | Delete
<strong><?php esc_html_e('Wordfence Settings', 'wordfence') ?></strong>
[767] Fix | Delete
<span class="wf-text-small"><?php esc_html_e('Diagnostic Wordfence settings/constants.', 'wordfence') ?></span>
[768] Fix | Delete
</div>
[769] Fix | Delete
<div class="wf-block-header-action">
[770] Fix | Delete
<div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive('wf-diagnostics-wordfence-settings') ? 'true' : 'false'); ?>" tabindex="0"></div>
[771] Fix | Delete
</div>
[772] Fix | Delete
</div>
[773] Fix | Delete
</div>
[774] Fix | Delete
<div class="wf-block-content wf-clearfix wf-padding-no-left wf-padding-no-right">
[775] Fix | Delete
<table class="wf-striped-table"<?php echo !empty($inEmail) ? ' border=1' : '' ?>>
[776] Fix | Delete
<tbody>
[777] Fix | Delete
<?php
[778] Fix | Delete
foreach (wfDiagnostic::getWordfenceValues() as $settingName => $settingData):
[779] Fix | Delete
if (isset($settingData['subheader'])) {
[780] Fix | Delete
?>
[781] Fix | Delete
<tr>
[782] Fix | Delete
<td colspan="2"><strong><?php echo esc_html($settingData['subheader']) ?></strong></td>
[783] Fix | Delete
</tr>
[784] Fix | Delete
<?php
[785] Fix | Delete
continue;
[786] Fix | Delete
}
[787] Fix | Delete
[788] Fix | Delete
$escapedDescription = strip_tags($settingData['description']);
[789] Fix | Delete
$escapedValue = __('(not set)', 'wordfence');
[790] Fix | Delete
if (isset($settingData['value'])) {
[791] Fix | Delete
$escapedValue = nl2br(strip_tags($settingData['value']));
[792] Fix | Delete
}
[793] Fix | Delete
?>
[794] Fix | Delete
<tr>
[795] Fix | Delete
<td><?php echo $escapedDescription ?></td>
[796] Fix | Delete
<td><?php echo $escapedValue ?></td>
[797] Fix | Delete
</tr>
[798] Fix | Delete
<?php endforeach ?>
[799] Fix | Delete
</tbody>
[800] Fix | Delete
</table>
[801] Fix | Delete
</div>
[802] Fix | Delete
</div>
[803] Fix | Delete
</div>
[804] Fix | Delete
<?php endif ?>
[805] Fix | Delete
[806] Fix | Delete
<?php if (!empty($inEmail)): ?>
[807] Fix | Delete
<div class="wf-diagnostics-wrapper">
[808] Fix | Delete
<div class="wf-block<?php echo(wfPersistenceController::shared()->isActive('wf-diagnostics-wordfence-central') ? ' wf-active' : '') ?>" data-persistence-key="<?php echo esc_attr('wf-diagnostics-wordfence-central') ?>">
[809] Fix | Delete
<div class="wf-block-header">
[810] Fix | Delete
<div class="wf-block-header-content">
[811] Fix | Delete
<div class="wf-block-title">
[812] Fix | Delete
<strong><?php esc_html_e('Wordfence Central', 'wordfence') ?></strong>
[813] Fix | Delete
<span class="wf-text-small"><?php esc_html_e('Diagnostic connection information for Wordfence Central.', 'wordfence') ?></span>
[814] Fix | Delete
</div>
[815] Fix | Delete
<div class="wf-block-header-action">
[816] Fix | Delete
<div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive('wf-diagnostics-wordfence-central') ? 'true' : 'false'); ?>" tabindex="0"></div>
[817] Fix | Delete
</div>
[818] Fix | Delete
</div>
[819] Fix | Delete
</div>
[820] Fix | Delete
<div class="wf-block-content wf-clearfix wf-padding-no-left wf-padding-no-right">
[821] Fix | Delete
<table class="wf-striped-table"<?php echo !empty($inEmail) ? ' border=1' : '' ?>>
[822] Fix | Delete
<tbody>
[823] Fix | Delete
<?php
[824] Fix | Delete
foreach (wfDiagnostic::getWordfenceCentralValues() as $settingName => $settingData):
[825] Fix | Delete
if (isset($settingData['subheader'])) {
[826] Fix | Delete
?>
[827] Fix | Delete
<tr>
[828] Fix | Delete
<td colspan="2"><strong><?php echo esc_html($settingData['subheader']) ?></strong></td>
[829] Fix | Delete
</tr>
[830] Fix | Delete
<?php
[831] Fix | Delete
continue;
[832] Fix | Delete
}
[833] Fix | Delete
[834] Fix | Delete
$escapedDescription = strip_tags($settingData['description']);
[835] Fix | Delete
$escapedValue = __('(not set)', 'wordfence');
[836] Fix | Delete
if (isset($settingData['value'])) {
[837] Fix | Delete
$escapedValue = nl2br(strip_tags($settingData['value']));
[838] Fix | Delete
}
[839] Fix | Delete
?>
[840] Fix | Delete
<tr>
[841] Fix | Delete
<td><?php echo $escapedDescription ?></td>
[842] Fix | Delete
<td><?php echo $escapedValue ?></td>
[843] Fix | Delete
</tr>
[844] Fix | Delete
<?php endforeach ?>
[845] Fix | Delete
</tbody>
[846] Fix | Delete
</table>
[847] Fix | Delete
</div>
[848] Fix | Delete
</div>
[849] Fix | Delete
</div>
[850] Fix | Delete
<?php endif ?>
[851] Fix | Delete
[852] Fix | Delete
<?php if (!empty($inEmail)): ?>
[853] Fix | Delete
<?php if (wfUtils::funcEnabled('phpinfo')) { phpinfo(); } else { echo '<strong>' . esc_html__('Unable to output phpinfo content because it is disabled', 'wordfence') . "</strong>\n"; } ?>
[854] Fix | Delete
<?php endif ?>
[855] Fix | Delete
[856] Fix | Delete
<?php if (!empty($emailForm)): ?>
[857] Fix | Delete
<div class="wf-diagnostics-wrapper">
[858] Fix | Delete
<div id="wf-diagnostics-other-tests" class="wf-block<?php echo(wfPersistenceController::shared()->isActive('wf-diagnostics-other-tests') ? ' wf-active' : '') ?>" data-persistence-key="<?php echo esc_attr('wf-diagnostics-other-tests') ?>">
[859] Fix | Delete
<div class="wf-block-header">
[860] Fix | Delete
<div class="wf-block-header-content">
[861] Fix | Delete
<div class="wf-block-title">
[862] Fix | Delete
<strong><?php esc_html_e('Other Tests', 'wordfence') ?></strong>
[863] Fix | Delete
<span class="wf-text-small"><?php esc_html_e('System configuration, memory test, send test email from this server.', 'wordfence') ?></span>
[864] Fix | Delete
</div>
[865] Fix | Delete
<div class="wf-block-header-action">
[866] Fix | Delete
<div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive('wf-diagnostics-other-tests') ? 'true' : 'false'); ?>" tabindex="0"></div>
[867] Fix | Delete
</div>
[868] Fix | Delete
</div>
[869] Fix | Delete
</div>
[870] Fix | Delete
<div class="wf-block-content wf-clearfix">
[871] Fix | Delete
<ul class="wf-block-list">
[872] Fix | Delete
<li>
[873] Fix | Delete
<span>
[874] Fix | Delete
<a href="<?php echo wfUtils::siteURLRelative(); ?>?_wfsf=sysinfo&nonce=<?php echo wp_create_nonce('wp-ajax'); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Click to view your system\'s configuration in a new window', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
[875] Fix | Delete
<a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_DIAGNOSTICS_SYSTEM_CONFIGURATION); ?>" target="_blank" rel="noopener noreferrer" class="wfhelp wf-inline-help"><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
[876] Fix | Delete
</span>
[877] Fix | Delete
</li>
[878] Fix | Delete
<li>
[879] Fix | Delete
<span>
[880] Fix | Delete
<a href="<?php echo wfUtils::siteURLRelative(); ?>?_wfsf=testmem&nonce=<?php echo wp_create_nonce('wp-ajax'); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Test your WordPress host\'s available memory', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
[881] Fix | Delete
<a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_DIAGNOSTICS_TEST_MEMORY); ?>" target="_blank" rel="noopener noreferrer" class="wfhelp wf-inline-help"><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
[882] Fix | Delete
</span>
[883] Fix | Delete
</li>
[884] Fix | Delete
<li>
[885] Fix | Delete
<span>
[886] Fix | Delete
<?php esc_html_e('Send a test email from this WordPress server to an email address:', 'wordfence'); ?> <a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_DIAGNOSTICS_TEST_EMAIL); ?>" target="_blank" rel="noopener noreferrer" class="wfhelp wf-inline-help"><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
[887] Fix | Delete
<input type="text" id="testEmailDest" value="" size="20" maxlength="255" class="wfConfigElem"/>
[888] Fix | Delete
<input class="wf-btn wf-btn-default wf-btn-sm" type="button" value="<?php esc_attr_e('Send Test Email', 'wordfence'); ?>" onclick="WFAD.sendTestEmail(jQuery('#testEmailDest').val());"/>
[889] Fix | Delete
</span>
[890] Fix | Delete
</li>
[891] Fix | Delete
<li>
[892] Fix | Delete
<span>
[893] Fix | Delete
<?php esc_html_e('Send a test activity report email:', 'wordfence'); ?> <a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_DIAGNOSTICS_TEST_ACTIVITY_REPORT); ?>" target="_blank" rel="noopener noreferrer" class="wfhelp wf-inline-help"><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
[894] Fix | Delete
<input type="email" id="email_summary_email_address_debug" value="" size="20" maxlength="255" class="wfConfigElem"/>
[895] Fix | Delete
<input class="wf-btn wf-btn-default wf-btn-sm" type="button" value="<?php esc_attr_e('Send Test Activity Report', 'wordfence'); ?>" onclick="WFAD.sendTestActivityReport(jQuery('#email_summary_email_address_debug').val());"/>
[896] Fix | Delete
</span>
[897] Fix | Delete
</li>
[898] Fix | Delete
<li>
[899] Fix | Delete
<span>
[900] Fix | Delete
<?php esc_html_e('Clear all Wordfence Central connection data', 'wordfence'); ?> <a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_DIAGNOSTICS_REMOVE_CENTRAL_DATA); ?>" target="_blank" rel="noopener noreferrer" class="wfhelp wf-inline-help"><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
[901] Fix | Delete
<input class="wf-btn wf-btn-default wf-btn-sm" type="button" value="<?php esc_attr_e('Clear All Connection Data', 'wordfence'); ?>" onclick="WFAD.ajax('wordfence_wfcentral_disconnect', { force: true }, function() { WFAD.colorboxModal((self.isSmallScreen ? '300px' : '400px'), <?php echo esc_attr(json_encode(__('Successfully removed data', 'wordfence'))) ?>, <?php echo esc_attr(json_encode(__('All associated Wordfence Central connection data has been cleared.', 'wordfence'))) ?>); });"/>
[902] Fix | Delete
<input class="wf-btn wf-btn-default wf-btn-sm" type="button" value="<?php esc_attr_e('Clear Local Connection Data', 'wordfence'); ?>" onclick="WFAD.ajax('wordfence_wfcentral_disconnect', { local: true }, function() { WFAD.colorboxModal((self.isSmallScreen ? '300px' : '400px'), <?php echo esc_attr(json_encode(__('Successfully removed data', 'wordfence'))) ?>, <?php echo esc_attr(json_encode(__('All associated Wordfence Central connection data has been removed from the local database.', 'wordfence'))) ?>); });"/>
[903] Fix | Delete
</span>
[904] Fix | Delete
</li>
[905] Fix | Delete
</ul>
[906] Fix | Delete
[907] Fix | Delete
</div>
[908] Fix | Delete
</div>
[909] Fix | Delete
[910] Fix | Delete
<div class="wf-block<?php echo(wfPersistenceController::shared()->isActive('wf-diagnostics-debugging-options') ? ' wf-active' : '') ?>" data-persistence-key="<?php echo esc_attr('wf-diagnostics-debugging-options') ?>">
[911] Fix | Delete
<div class="wf-block-header">
[912] Fix | Delete
<div class="wf-block-header-content">
[913] Fix | Delete
<div class="wf-block-title">
[914] Fix | Delete
<strong><?php esc_html_e('Debugging Options', 'wordfence') ?></strong>
[915] Fix | Delete
</div>
[916] Fix | Delete
<div class="wf-block-header-action">
[917] Fix | Delete
<div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive('wf-diagnostics-debugging-options') ? 'true' : 'false'); ?>" tabindex="0"></div>
[918] Fix | Delete
</div>
[919] Fix | Delete
</div>
[920] Fix | Delete
</div>
[921] Fix | Delete
<div class="wf-block-content wf-clearfix">
[922] Fix | Delete
<form action="#" id="wfDebuggingConfigForm">
[923] Fix | Delete
<ul class="wf-block-list">
[924] Fix | Delete
<li>
[925] Fix | Delete
<?php
[926] Fix | Delete
echo wfView::create('options/option-toggled', array(
[927] Fix | Delete
'optionName' => 'debugOn',
[928] Fix | Delete
'enabledValue' => 1,
[929] Fix | Delete
'disabledValue' => 0,
[930] Fix | Delete
'value' => $w->get('debugOn') ? 1 : 0,
[931] Fix | Delete
'title' => __('Enable debugging mode (increases database load)', 'wordfence'),
[932] Fix | Delete
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DIAGNOSTICS_OPTION_DEBUGGING_MODE),
[933] Fix | Delete
))->render();
[934] Fix | Delete
?>
[935] Fix | Delete
</li>
[936] Fix | Delete
<li>
[937] Fix | Delete
<?php
[938] Fix | Delete
echo wfView::create('options/option-toggled', array(
[939] Fix | Delete
'optionName' => 'startScansRemotely',
[940] Fix | Delete
'enabledValue' => 1,
[941] Fix | Delete
'disabledValue' => 0,
[942] Fix | Delete
'value' => $w->get('startScansRemotely') ? 1 : 0,
[943] Fix | Delete
'title' => __('Start all scans remotely (Try this if your scans aren\'t starting and your site is publicly accessible)', 'wordfence'),
[944] Fix | Delete
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DIAGNOSTICS_OPTION_REMOTE_SCANS),
[945] Fix | Delete
))->render();
[946] Fix | Delete
?>
[947] Fix | Delete
</li>
[948] Fix | Delete
<li>
[949] Fix | Delete
<?php
[950] Fix | Delete
echo wfView::create('options/option-toggled', array(
[951] Fix | Delete
'optionName' => 'ssl_verify',
[952] Fix | Delete
'enabledValue' => 1,
[953] Fix | Delete
'disabledValue' => 0,
[954] Fix | Delete
'value' => $w->get('ssl_verify') ? 1 : 0,
[955] Fix | Delete
'title' => __('Enable SSL Verification (Disable this if you are consistently unable to connect to the Wordfence servers.)', 'wordfence'),
[956] Fix | Delete
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DIAGNOSTICS_OPTION_SSL_VERIFICATION),
[957] Fix | Delete
))->render();
[958] Fix | Delete
?>
[959] Fix | Delete
</li>
[960] Fix | Delete
<li>
[961] Fix | Delete
<?php
[962] Fix | Delete
echo wfView::create('options/option-toggled', array(
[963] Fix | Delete
'optionName' => 'avoid_php_input',
[964] Fix | Delete
'enabledValue' => 1,
[965] Fix | Delete
'disabledValue' => 0,
[966] Fix | Delete
'value' => wfWAF::getInstance()->getStorageEngine()->getConfig('avoid_php_input', false) ? 1 : 0,
[967] Fix | Delete
'title' => __('Disable reading of php://input', 'wordfence'),
[968] Fix | Delete
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DIAGNOSTICS_OPTION_DISABLE_PHP_INPUT),
[969] Fix | Delete
))->render();
[970] Fix | Delete
?>
[971] Fix | Delete
</li>
[972] Fix | Delete
<li>
[973] Fix | Delete
<?php
[974] Fix | Delete
echo wfView::create('options/option-toggled', array(
[975] Fix | Delete
'optionName' => 'wordfenceI18n',
[976] Fix | Delete
'enabledValue' => 1,
[977] Fix | Delete
'disabledValue' => 0,
[978] Fix | Delete
'value' => $w->get('wordfenceI18n') ? 1 : 0,
[979] Fix | Delete
'title' => 'Enable Wordfence translations',
[980] Fix | Delete
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DIAGNOSTICS_OPTION_WORDFENCE_TRANSLATIONS),
[981] Fix | Delete
))->render();
[982] Fix | Delete
?>
[983] Fix | Delete
</li>
[984] Fix | Delete
<li>
[985] Fix | Delete
<p>
[986] Fix | Delete
<a id="wf-restore-defaults" class="wf-btn wf-btn-default wf-btn-callout-subtle" href="#" data-restore-defaults-section="<?php echo esc_attr(wfConfig::OPTIONS_TYPE_DIAGNOSTICS); ?>" role="button"><?php esc_html_e('Restore Defaults', 'wordfence'); ?></a>
[987] Fix | Delete
<a id="wf-cancel-changes" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-disabled" href="#" role="button"><?php esc_html_e('Cancel Changes', 'wordfence'); ?></a>
[988] Fix | Delete
<a id="wf-save-changes" class="wf-btn wf-btn-primary wf-btn-callout-subtle wf-disabled" href="#" role="button"><?php esc_html_e('Save Changes', 'wordfence'); ?></a>
[989] Fix | Delete
</p>
[990] Fix | Delete
</li>
[991] Fix | Delete
</ul>
[992] Fix | Delete
</form>
[993] Fix | Delete
</div>
[994] Fix | Delete
</div>
[995] Fix | Delete
</div>
[996] Fix | Delete
[997] Fix | Delete
<?php endif ?>
[998] Fix | Delete
</div>
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function