Compare commits

...

1 Commits

Author SHA1 Message Date
1f34bd6520 Bookstack: Fix PHP Issue & Bump to PHP 8.3 2025-07-07 09:00:35 +02:00
3 changed files with 14 additions and 5 deletions

View File

@ -39,6 +39,7 @@ function update_script() {
msg_ok "Backup finished"
fetch_and_deploy_gh_release "bookstack" "BookStackApp/BookStack"
PHP_MODULE="ldap,tidy,bz2,mysqli" PHP_FPM="YES" PHP_APACHE="YES" PHP_VERSION="8.3" setup_php
msg_info "Restoring backup"
cp /opt/bookstack-backup/.env /opt/bookstack/.env

View File

@ -19,7 +19,8 @@ $STD apt-get install -y \
make
msg_ok "Installed Dependencies"
PHP_MODULE="fpm, ldap, tidy, bz2, mysql" PHP_FPM="YES" PHP_APACHE="YES" PHP_VERSION="8.2" setup_php
PHP_MODULE="ldap,tidy,bz2,mysqli" PHP_FPM="YES" PHP_APACHE="YES" PHP_VERSION="8.3" setup_php
setup_composer
setup_mariadb

View File

@ -434,6 +434,13 @@ function setup_php() {
$STD apt-get update
fi
for pkg in $MODULE_LIST; do
if ! apt-cache show "$pkg" >/dev/null 2>&1; then
msg_error "Package not found: $pkg"
exit 1
fi
done
local MODULE_LIST="php${PHP_VERSION}"
IFS=',' read -ra MODULES <<<"$COMBINED_MODULES"
for mod in "${MODULES[@]}"; do
@ -443,6 +450,10 @@ function setup_php() {
if [[ "$PHP_FPM" == "YES" ]]; then
MODULE_LIST+=" php${PHP_VERSION}-fpm"
fi
if [[ "$PHP_APACHE" == "YES" ]]; then
$STD apt-get install -y apache2
$STD systemctl restart apache2 || true
fi
if [[ "$PHP_APACHE" == "YES" ]] && [[ -n "$CURRENT_PHP" ]]; then
if [[ -f /etc/apache2/mods-enabled/php${CURRENT_PHP}.load ]]; then
@ -458,10 +469,6 @@ function setup_php() {
$STD apt-get install -y $MODULE_LIST
msg_ok "Setup PHP $PHP_VERSION"
if [[ "$PHP_APACHE" == "YES" ]]; then
$STD systemctl restart apache2 || true
fi
if [[ "$PHP_FPM" == "YES" ]]; then
$STD systemctl enable php${PHP_VERSION}-fpm
$STD systemctl restart php${PHP_VERSION}-fpm