Skip to content

Commit 0b949c8

Browse files
authored
tools.func: fix an bug while php libapache2-mod breaks (#5857)
1 parent fd248e0 commit 0b949c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

misc/tools.func

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,14 +451,16 @@ function setup_php() {
451451
MODULE_LIST+=" php${PHP_VERSION}-fpm"
452452
fi
453453
if [[ "$PHP_APACHE" == "YES" ]]; then
454-
$STD apt-get install -y apache2
454+
$STD apt-get install -y apache2 libapache2-mod-php${PHP_VERSION}
455455
$STD systemctl restart apache2 || true
456456
fi
457457

458458
if [[ "$PHP_APACHE" == "YES" ]] && [[ -n "$CURRENT_PHP" ]]; then
459459
if [[ -f /etc/apache2/mods-enabled/php${CURRENT_PHP}.load ]]; then
460460
$STD a2dismod php${CURRENT_PHP} || true
461461
fi
462+
$STD a2enmod php${PHP_VERSION}
463+
$STD systemctl restart apache2 || true
462464
fi
463465

464466
if [[ "$PHP_FPM" == "YES" ]] && [[ -n "$CURRENT_PHP" ]]; then

0 commit comments

Comments
 (0)