ZwiiCMS/core/include/checkup.php

42 lines
953 B
PHP
Raw Normal View History

2023-02-09 10:36:52 +01:00
<?php
/**
* Vérification de la version de PHP
*/
if(version_compare(PHP_VERSION, '7.2.0', '<') ) {
exit('PHP 7.2+ mini requis - PHP 7.2+ mini required');
}
2023-02-10 10:41:57 +01:00
if ( version_compare(PHP_VERSION, '8.1.999', '>') ) {
exit('PHP 8.3 pas encore supporté, installez PHP 7.n ou PHP 8.1.n - PHP 8.3 not yet supported, install PHP 7.n or PHP 8.1.n');
2023-02-09 10:36:52 +01:00
}
/**
* Check les modules installés
*/
$e = [
'gd',
'json',
'date',
'mbstring',
'zip',
'intl',
'exif',
'Phar',
'fileinfo',
'session'
];
$m = get_loaded_extensions();
$b = false;
foreach ($e as $k => $v) {
if (array_search($v,$m) === false) {
$b = true;
echo '<pre><p>Module ' . $v . ' manquant - Module ' . $v . ' missing.</p></pre>';
}
}
if ($b)
exit('<pre><p>ZwiiCMS ne peut pas démarrer ; activez les extensions requises - ZwiiCMS cannot run, enabled missing extensions.</p></pre>');