Till Brehm
2014-03-11 621f2702ac5a707818141e6695767b519ecbdf4a
install/lib/install.lib.php
@@ -812,6 +812,7 @@
   if(!$timezone && is_link('/etc/localtime')) {
      $timezone = readlink('/etc/localtime');
      $timezone = str_replace('/usr/share/zoneinfo/', '', $timezone);
      $timezone = str_replace('..', '', $timezone);
      if(substr($timezone, 0, 6) === 'posix/') $timezone = substr($timezone, 6);
   } elseif(!$timezone) {
      $hash = md5_file('/etc/localtime');
@@ -853,5 +854,31 @@
      }
   }
function getapachemodules() {
   global $app;
   $cmd = '';
   if(is_installed('apache2ctl')) $cmd = 'apache2ctl -t -D DUMP_MODULES';
   elseif(is_installed('apachectl')) $cmd = 'apachectl -t -D DUMP_MODULES';
   else {
      $app->log("Could not check apache modules, apachectl not found.", LOGLEVEL_WARN);
      return array();
   }
   exec($cmd, $output, $return_var);
   if($return_var != 0 || !$output[0]) {
      $app->log("Could not check apache modules, apachectl did not return any data.", LOGLEVEL_WARN);
      return array();
   }
   $modules = array();
   for($i = 0; $i < count($output); $i++) {
      if(preg_match('/^\s*(\w+)\s+\((shared|static)\)\s*$/', $output[$i], $matches)) {
         $modules[] = $matches[1];
      }
   }
   return $modules;
}
?>