mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-23 22:30:41 +01:00
fixed error during install, where "apache_get_modules" is not available
This commit is contained in:
parent
f191979f9b
commit
413c026dc7
1 changed files with 14 additions and 9 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue