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