From 1c7d875d85583c1eb953e1ef15e9f28d9fd67f23 Mon Sep 17 00:00:00 2001 From: Brian Rodriguez <48717031+CervezaStallone@users.noreply.github.com> Date: Fri, 14 Aug 2026 15:21:26 +0200 Subject: [PATCH] fix(ampache): update to PHP 8.5 asset, auto-upgrade PHP on update (#16484) Ampache 8.0.0 dropped the php8.4 prebuilt zip in favor of php8.5, so new installs and updates could no longer find a matching release asset. Install script now provisions PHP 8.5; update script detects existing PHP 8.4 containers and upgrades them to 8.5 before fetching the new release. Closes #16482 --- ct/ampache.sh | 10 +++++++++- install/ampache-install.sh | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ct/ampache.sh b/ct/ampache.sh index 92eb11a70..60cb69a9f 100644 --- a/ct/ampache.sh +++ b/ct/ampache.sh @@ -39,7 +39,15 @@ function update_script() { /opt/ampache/public/play/.htaccess \ /opt/ampache/advanced-config - fetch_and_deploy_gh_release "Ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.4.zip" + if ! dpkg -l 2>/dev/null | grep -q "libapache2-mod-php8.5"; then + PHP_VERSION="8.5" PHP_APACHE="YES" setup_php + sed -i -e 's/upload_max_filesize = .*/upload_max_filesize = 100M/' \ + -e 's/post_max_size = .*/post_max_size = 100M/' \ + -e 's/max_execution_time = .*/max_execution_time = 600/' \ + -e 's/memory_limit = .*/memory_limit = 512M/' /etc/php/8.5/apache2/php.ini + fi + + fetch_and_deploy_gh_release "Ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.5.zip" restore_backup chmod 664 /opt/ampache/public/rest/.htaccess /opt/ampache/public/play/.htaccess diff --git a/install/ampache-install.sh b/install/ampache-install.sh index 142084f32..9444b6f81 100644 --- a/install/ampache-install.sh +++ b/install/ampache-install.sh @@ -27,11 +27,11 @@ $STD apt install -y \ libvpx-dev msg_ok "Installed dependencies" -PHP_VERSION="8.4" PHP_APACHE="YES" setup_php +PHP_VERSION="8.5" PHP_APACHE="YES" setup_php setup_mariadb MARIADB_DB_USER="ampache" MARIADB_DB_NAME="ampache" setup_mariadb_db -fetch_and_deploy_gh_release "ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.4.zip" +fetch_and_deploy_gh_release "ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.5.zip" msg_info "Setting up Ampache" rm -rf /var/www/html @@ -58,7 +58,7 @@ msg_info "Configuring PHP" sed -i -e 's/upload_max_filesize = .*/upload_max_filesize = 100M/' \ -e 's/post_max_size = .*/post_max_size = 100M/' \ -e 's/max_execution_time = .*/max_execution_time = 600/' \ - -e 's/memory_limit = .*/memory_limit = 512M/' /etc/php/8.4/apache2/php.ini + -e 's/memory_limit = .*/memory_limit = 512M/' /etc/php/8.5/apache2/php.ini $STD a2enmod rewrite $STD systemctl restart apache2 msg_ok "Configured PHP"