- merging branch d00p/perl-suexec-workaround to trunk, fixes #319
This commit is contained in:
@@ -954,3 +954,22 @@ if(isFroxlorVersion('0.9.11'))
|
||||
|
||||
updateToVersion('0.9.12-svn1');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.12-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.12-svn1 to 0.9.12-svn2", false);
|
||||
|
||||
$update_perl_suexecworkaround = isset($_POST['update_perl_suexecworkaround']) ? (int)$_POST['update_perl_suexecworkaround'] : '0';
|
||||
$update_perl_suexecpath = isset($_POST['update_perl_suexecpath']) ? $_POST['update_perl_suexecpath'] : '/var/www/cgi-bin/';
|
||||
|
||||
if($update_perl_suexecpath == '') {
|
||||
$update_perl_suexecpath = '/var/www/cgi-bin/';
|
||||
}
|
||||
|
||||
showUpdateStep("Adding new settings for perl/CGI");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('perl', 'suexecworkaround', '".$db->escape($update_perl_suexecworkaround)."');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('perl', 'suexecpath', '".$db->escape($update_perl_suexecpath)."');");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.12-svn2');
|
||||
}
|
||||
|
||||
@@ -255,4 +255,16 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.12-svn2'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'Many apache user will have problems using perl/CGI as the customer docroots are not within the suexec path. Froxlor provides a simple workaround for that.';
|
||||
$question = '<strong>Enable Apache/SuExec/Perl workaround?:</strong> ';
|
||||
$question.= makeyesno('update_perl_suexecworkaround', '1', '0', '0').'<br /><br />';
|
||||
$question.= '<strong>If \'yes\', please specify a path within the suexec path where Froxlor will create symlinks to customer perl-enabled paths:</strong><br /><br />';
|
||||
$question.= 'Path for symlinks (must be within suexec path): ';
|
||||
$question.= '<input type="text" class="text" name="update_perl_suexecpath" value="/var/www/cgi-bin/" /><br />';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user