Skip to content

Commit

Permalink
Don't reject and FPM version change when it's not really changing
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Aug 15, 2020
1 parent 76b82cc commit a4c77af
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions virtual_feature.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1210,18 +1210,25 @@ sub feature_list_web_php_directories
}

# feature_save_web_php_directory(&domain, dir, version)
# Cannot set the version for any sub-directory
# Change the PHP version for the whole site
sub feature_save_web_php_directory
{
my ($d, $dir, $ver) = @_;
$dir eq &virtual_server::public_html_dir($d) ||
&error($text{'feat_ephpdir'});
my $mode = &feature_get_web_php_mode($d);
$mode eq "fcgid" ||
&error($text{'feat_ephpmode'});
my @avail = &virtual_server::list_available_php_versions($d, $mode);
if ($mode eq "fpm") {
# Multiple FPM versions aren't supported yet, but we can at least
# use the actual version of FPM running
if ($avail[0]->[0] eq $ver) {
$d->{'nginx_php_version'} = $ver;
return undef;
}
return $text{'feat_ephpmode'};
}

# Get the current version
my @avail = &virtual_server::list_available_php_versions($d);
my $phpcmd = &find_php_fcgi_server($d);
my $defver;
if ($phpcmd) {
Expand Down

0 comments on commit a4c77af

Please sign in to comment.