From 4d887da6daf014b72fc6f30b7629fb086eb0ca1e Mon Sep 17 00:00:00 2001 From: ruan <2369127-ruany@users.noreply.gitlab.com> Date: Mon, 28 Feb 2022 07:19:28 +0200 Subject: [PATCH] Print all loaded extensions when some are missing --- error/missing-extensions.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/error/missing-extensions.php b/error/missing-extensions.php index ecc0b3b..68ceffc 100644 --- a/error/missing-extensions.php +++ b/error/missing-extensions.php @@ -12,18 +12,23 @@

Missing Extensions


- The following PHP extensions are required by litebans-php but were not found: -
$ext
"; + $problems[] = "- $ext"; } } - $phpini = php_ini_loaded_file(); + if (count($problems) > 0) { + echo("The following PHP extensions are required by litebans-php but were not found:
"); + echo(implode("
", $problems)); + $phpini = php_ini_loaded_file(); - echo "These extensions can be enabled in php.ini.

"; - echo "php.ini location: " . $phpini . "
"; + echo "These extensions can be enabled in php.ini.

"; + echo "php.ini location: " . $phpini . "
"; + echo "List of currently loaded extensions:"; + echo(implode(', ', get_loaded_extensions())); + } ?>