check for fcgid being enabled when switching the webserver as only apache2 can handle fcgid (prevent a possible deadlock in the panel)

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-11-27 08:34:49 +01:00
parent 87fae7f2e4
commit 4381eff384
4 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2013 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Roman Schmerold <bnoize@froxlor.org>
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package AJAX
*
*/
function checkPhpInterfaceSetting($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues) {
global $settings;
$returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_OK);
if ((int)$settings['system']['mod_fcgid'] == 1) {
// now check if we enable a webserver != apache
if (strtolower($newfieldvalue) != 'apache2') {
$returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'fcgidstillenableddeadlock');
}
}
return $returnvalue;
}