mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Show 64-bit recommendation in check requirements CLI and server info page
This commit is contained in:
parent
cb7be460d7
commit
1e6065f732
3 changed files with 18 additions and 0 deletions
|
@ -76,6 +76,17 @@ class CheckRequirementsCommand extends Command
|
|||
$io->success('PHP version is sufficient.');
|
||||
}
|
||||
|
||||
//Checking 32-bit system
|
||||
if (PHP_INT_SIZE === 4) {
|
||||
$io->warning('You are using a 32-bit system. You will have problems with working with dates after the year 2038, therefore a 64-bit system is recommended.');
|
||||
} elseif (PHP_INT_SIZE === 8) {
|
||||
if (!$only_issues) {
|
||||
$io->success('You are using a 64-bit system.');
|
||||
}
|
||||
} else {
|
||||
$io->warning('You are using a system with an unknown bit size. That is interesting xD');
|
||||
}
|
||||
|
||||
//Check if opcache is enabled
|
||||
if ($io->isVerbose()) {
|
||||
$io->comment('Checking Opcache...');
|
||||
|
|
|
@ -77,6 +77,7 @@ class ToolsController extends AbstractController
|
|||
'php_version' => PHP_VERSION,
|
||||
'php_uname' => php_uname('a'),
|
||||
'php_sapi' => PHP_SAPI,
|
||||
'php_bit_size' => PHP_INT_SIZE * 8,
|
||||
'php_extensions' => [...get_loaded_extensions()],
|
||||
'php_opcache_enabled' => ini_get('opcache.enable'),
|
||||
'php_upload_max_filesize' => ini_get('upload_max_filesize'),
|
||||
|
|
|
@ -9,6 +9,12 @@
|
|||
<td>Server Operating System</td>
|
||||
<td>{{ php_uname }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PHP Bit Size</td>
|
||||
<td>{{ php_bit_size }}-bit
|
||||
{% if php_bit_size < 64 %}<span class="text-warning">(32-bit PHP is affected by Year 2038 problem, and can not work with dates after 2038!)</span>{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Opcache enabled</td>
|
||||
<td>{{ helper.boolean_badge(php_opcache_enabled) }}</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue