fixed error during install, where "apache_get_modules" is not available

This commit is contained in:
Krehan Tim 2018-11-12 09:02:43 +01:00
parent f191979f9b
commit 413c026dc7

View file

@ -12,14 +12,19 @@ if (!($_SESSION["docroot"]))
$mods_enabled = array("mod_rewrite");
$missing_mods = array();
if(function_exists("apache_get_modules")){
$apache_mods = apache_get_modules();
foreach($mods_enabled as $mod){
if(!(in_array($mod, apache_get_modules()))){
if(!(in_array($mod, $apache_mods))){
array_push($missing_mods, $mod);
}
}
}
if(!(class_exists('mysqli'))){ #php-mysql not installed
array_push($missing_mods, "mysql");
}
if(sizeof($missing_mods)>0){
header("Location: /cont/error.php?id=php_modules&missing_mods=".serialize($missing_mods));
}