Add check for required PHP extensions on engine installation

This commit is contained in:
Visman 2023-04-01 21:21:03 +07:00
parent eaee8bff13
commit 9560a381f8

View file

@ -24,6 +24,26 @@ function forkGetBaseURL()
return \rtrim($baseURL, '/');
}
$extNotFound = \array_diff(
[
'date',
'filter',
'hash',
'json',
'SPL',
'pcre',
'PDO',
'fileinfo',
'intl',
'mbstring',
],
\get_loaded_extensions()
);
if (! empty($extNotFound)) {
exit('Please enable the following extensions in PHP: ' . implode(', ', $extNotFound));
}
return [
'BASE_URL' => forkGetBaseURL(),
'DEBUG' => 0,