mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-27 19:37:22 +01:00
Upgrade from PHP 7.2 to 8.0 for Ubuntu 22.04
* Add the PHP PPA. * Specify the version when invoking the php CLI. * Specify the version in package names. * Update paths to 8.0 (using a variable in the setup scripts). * Update z-push's php-xsl dependency to php8.0-xml. * php-json is now built-into PHP. Although PHP 8.1 is the stock version in Ubuntu 22.04, it's not supported by Nextcloud yet, and it likely will never be supported by the the version of Nextcloud that succeeds the last version of Nextcloud that supports PHP 7.2, and we have to install the next version so that an upgrade is permitted, so skipping to PHP 8.1 may not be easily possible.
This commit is contained in:
@@ -17,9 +17,9 @@ source /etc/mailinabox.conf # load global vars
|
||||
|
||||
echo "Installing Z-Push (Exchange/ActiveSync server)..."
|
||||
apt_install \
|
||||
php-soap php-imap libawl-php php-xsl
|
||||
php${PHP_VER}-soap php${PHP_VER}-imap libawl-php php$PHP_VER-xml
|
||||
|
||||
phpenmod -v php imap
|
||||
phpenmod -v $PHP_VER imap
|
||||
|
||||
# Copy Z-Push into place.
|
||||
VERSION=2.6.2
|
||||
@@ -42,8 +42,6 @@ if [ $needs_update == 1 ]; then
|
||||
rm -rf /tmp/z-push.zip /tmp/z-push
|
||||
|
||||
rm -f /usr/sbin/z-push-{admin,top}
|
||||
ln -s /usr/local/lib/z-push/z-push-admin.php /usr/sbin/z-push-admin
|
||||
ln -s /usr/local/lib/z-push/z-push-top.php /usr/sbin/z-push-top
|
||||
echo $VERSION > /usr/local/lib/z-push/version
|
||||
fi
|
||||
|
||||
@@ -102,8 +100,8 @@ EOF
|
||||
|
||||
# Restart service.
|
||||
|
||||
restart_service php7.2-fpm
|
||||
restart_service php$PHP_VER-fpm
|
||||
|
||||
# Fix states after upgrade
|
||||
|
||||
hide_output z-push-admin -a fixstates
|
||||
hide_output php$PHP_VER /usr/local/lib/z-push/z-push-admin.php -a fixstates
|
||||
|
||||
Reference in New Issue
Block a user