xref: /webtrees/resources/views/setup/step-2-server-checks.phtml (revision 5e6816be28791f7fa2ef2bd1e23a17dee823d3b5)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4
5?>
6
7<form method="post" autocomplete="off">
8    <input name="lang" type="hidden" value="<?= e($lang) ?>">
9    <input name="dbtype" type="hidden" value="<?= e($dbtype) ?>">
10    <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>">
11    <input name="dbport" type="hidden" value="<?= e($dbport) ?>">
12    <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>">
13    <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>">
14    <input name="dbname" type="hidden" value="<?= e($dbname) ?>">
15    <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>">
16    <input name="wtname" type="hidden" value="<?= e($wtname) ?>">
17    <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>">
18    <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>">
19    <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>">
20
21    <h2>
22        <?= I18N::translate('Checking server configuration') ?>
23    </h2>
24
25    <?php foreach ($errors as $error) : ?>
26        <p class="alert alert-danger"><?= $error ?></p>
27    <?php endforeach ?>
28
29    <?php foreach ($warnings as $warning) : ?>
30        <p class="alert alert-warning"><?= $warning ?></p>
31    <?php endforeach ?>
32
33    <?php if ($errors->isEmpty() && $warnings->isEmpty()) : ?>
34        <p>
35            <?= I18N::translate('The server configuration is OK.') ?>
36        </p>
37    <?php endif ?>
38
39    <h2><?= I18N::translate('Checking server capacity') ?></h2>
40
41    <p>
42        <?= I18N::translate('The memory and CPU time requirements depend on the number of individuals in your family tree.') ?>
43    </p>
44    <p>
45        <?= I18N::translate('The following list shows typical requirements.') ?>
46    </p>
47    <p>
48        <?= I18N::translate('Small systems (500 individuals): 16–32 MB, 10–20 seconds') ?>
49        <br>
50        <?= I18N::translate('Medium systems (5,000 individuals): 32–64 MB, 20–40 seconds') ?>
51        <br>
52        <?= I18N::translate('Large systems (50,000 individuals): 64–128 MB, 40–80 seconds') ?>
53    </p>
54
55    <p class="alert alert-<?= $memory_limit < 32 || $cpu_limit > 0 && $cpu_limit < 20 ? 'danger' : 'success' ?>">
56        <?= I18N::translate('This server’s memory limit is %s MB and its CPU time limit is %s seconds.', I18N::number($memory_limit), I18N::number($cpu_limit)) ?>
57    </p>
58
59    <p>
60        <?= I18N::translate('If you try to exceed these limits, you may experience server time-outs and blank pages.') ?>
61    </p>
62
63    <hr>
64
65    <div class="d-flex justify-content-between">
66        <button class="btn btn-primary" name="step" type="submit" value="3">
67            <?= I18N::translate('next') ?>
68        </button>
69
70        <button class="btn btn-secondary" name="step" type="submit" value="1">
71            <?= I18N::translate('previous') ?>
72        </button>
73    </div>
74</form>
75