Added pre-install dependency check

This commit is contained in:
Julian Prieber 2023-03-19 14:51:24 +01:00
parent ef23c5645c
commit 88b73febf9
1 changed files with 60 additions and 47 deletions

View File

@ -3,6 +3,18 @@
use Illuminate\Contracts\Http\Kernel;
use Illuminate\Http\Request;
$installing_file_exists = file_exists(__DIR__ . '/INSTALLING');
if ($installing_file_exists) {
$required_extensions = array('bcmath', 'ctype', 'curl', 'dom', 'fileinfo', 'json', 'mbstring', 'openssl', 'pcre', 'pdo', 'tokenizer', 'xml');
foreach ($required_extensions as $ext) {
if (!extension_loaded($ext)) {
throw new Exception('PHP extension ' . $ext . ' is not installed on your system');
}
}
}
define('LARAVEL_START', microtime(true));
/*
@ -53,3 +65,4 @@ $response = tap($kernel->handle(
))->send();
$kernel->terminate($request, $response);