diff --git a/lib/os/class.ISPConfigDebianOS.inc.php b/lib/os/class.ISPConfigDebianOS.inc.php index 6c1bdac11f6dac559fc62f24d8342287bcbdcc2a..7dc71aa5d2f426b71a1988c6f360c9cc5f451641 100644 --- a/lib/os/class.ISPConfigDebianOS.inc.php +++ b/lib/os/class.ISPConfigDebianOS.inc.php @@ -158,7 +158,17 @@ class ISPConfigDebianOS extends ISPConfigBaseOS { } protected function getApacheModulesToDisable() { - $modules = array('php8.0', 'mpm_prefork'); + $modules = array( + 'mpm_prefork' + ); + + if(ISPConfig::wantsPHP() === 'system') { + array_unshift($modules, 'php' . $this->getSystemPHPVersion()); + } else { + array_unshift($modules, 'php8.0'); + ); + } + } return $modules; } @@ -804,6 +814,7 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"'; if(ISPConfig::wantsPHP() === 'system') { $php_versions = array($this->getSystemPHPVersion()); } else { + // If a new version is added, the getApacheModulesToDisable function should be updated to disable the latest version $php_versions = array( '5.6', '7.0',