added memory limit (same as in debug view)

This commit is contained in:
HB9HIL
2024-07-27 15:20:25 +02:00
parent 4568c6be1d
commit 1d62a5f6e6
2 changed files with 19 additions and 0 deletions

View File

@@ -192,6 +192,24 @@ if (!file_exists('.lock')) {
<?php } ?>
</td>
</tr>
<tr>
<td>memory_limit</td>
<td><?php echo '> ' . $memory_limit . 'M'; ?></td>
<td>
<?php
$memoryLimit = ini_get('memory_limit');
$memoryLimitBytes = (int)($memoryLimit) * (1024 * 1024); // convert to bytes
if ($memoryLimitBytes >= ($memory_limit * 1024 * 1024)) { // compare with given value in bytes
?>
<span class="badge text-bg-success"><?php echo $memoryLimit; ?></span>
<?php } else {
if ($prechecks_passed != 'failed') { // Check current value before changing to 'warning'
$prechecks_passed = 'warning';
} ?>
<span class="badge text-bg-warning"><?php echo $memoryLimit; ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td>allow_url_fopen</td>
<td>On</td>