| Conditions | 4 |
| Paths | 4 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | private function getActiveApacheModules(): array |
||
| 19 | { |
||
| 20 | $output = []; |
||
| 21 | $returnVar = 0; |
||
| 22 | |||
| 23 | exec('apache2ctl -M 2>&1', $output, $returnVar); |
||
| 24 | |||
| 25 | if ($returnVar !== 0) { |
||
| 26 | return []; |
||
| 27 | } |
||
| 28 | |||
| 29 | $modules = []; |
||
| 30 | |||
| 31 | foreach ($output as $line) { |
||
| 32 | if (preg_match('/^\s*([a-z_]+)_module/', $line, $matches)) { |
||
| 33 | $modules[] = $matches[1]; |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | return $modules; |
||
| 38 | } |
||
| 41 |