diff --git a/lib/Froxlor/Api/Commands/SubDomains.php b/lib/Froxlor/Api/Commands/SubDomains.php index 3bc1efb5..c3a0a322 100644 --- a/lib/Froxlor/Api/Commands/SubDomains.php +++ b/lib/Froxlor/Api/Commands/SubDomains.php @@ -268,8 +268,11 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc } else { $allowed_phpconfigs = []; } - if (! in_array($phpsid_result['phpsettingid'], $allowed_phpconfigs)) { - \Froxlor\UI\Response::standard_error('notallowedphpconfigused', '', true); + // only with fcgid/fpm enabled will it be possible to select a php-setting + if ((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) { + if (! in_array($phpsid_result['phpsettingid'], $allowed_phpconfigs)) { + \Froxlor\UI\Response::standard_error('notallowedphpconfigused', '', true); + } } // actually insert domain @@ -654,8 +657,11 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc } else { $allowed_phpconfigs = []; } - if (! in_array($phpsettingid, $allowed_phpconfigs)) { - \Froxlor\UI\Response::standard_error('notallowedphpconfigused', '', true); + // only with fcgid/fpm enabled will it be possible to select a php-setting + if ((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) { + if (! in_array($phpsettingid, $allowed_phpconfigs)) { + \Froxlor\UI\Response::standard_error('notallowedphpconfigused', '', true); + } } // handle redirect