PHP-8.1 Upgrade Advice

I am on Ubuntu 20.04 running LAMP with php7.4, and NC 24.05.

As far as I can determine there isn’t a php8.1-redis package for Ubuntu 20.04 (please correct me if I am wrong, by providing a repo)…

At the same time some apps are dropping support for php7.4 (EOL)…

My webhosting company doesn’t yet support Ubuntu 22.04… So I am faced with the quandry… Should I just disable apps that can’t support php7.4 or is there some other option workaround that I should try?

PHP 8.1 repo supports 20.04 as you’ll see in any of these guides for adding and installing on Ubuntu.

sudo apt install software-properties-common && sudo add-apt-repository ppa:ondrej/php -y

from this PHP and Debian developer

1 Like

@just I have php8.1 installed and I have the ppa:ondrej/php repo installed as well. What I can’t find… is the the php8.1-redis module for ubuntu 20.04…

php8.1-redis module seems to only be available on 22.04, in which case my php upgrade has been thwarted as my webhost currently only supports 20.04.

Am I mistaken?

In this case ask your webhost directly. Since they provide your infrastructure, they should be able to help you with directly.

The webhost provider provides 20.04… they don’t support Nextcloud.

So, I will ask a more direct question.

Has anyone been able to put Nextcloud on php8.1, while running ubuntu 20.04?

If so, how?

If not… just don’t reply…

I’m saying to ask your webhost with help installing that php 8.1 package. fwiw, that is a super normal thing to want help with.

Any webhost should be able, and even willing, to help you. Honestly, they should provide documentation as well.

I’m hopeful that they will at least be willing to assist you in getting the package properly installed since they are not supporting 22.04 (good luck!)

Yes I have. But I installed it on a standard Ubuntu 20.04 server installation. You on the other hand are talking about a webhost? You also said you added ppa:ondrej/php, but adding PPAs is usually not something you can do on a regular web hosting plan. So what hosting plan do you use exactly? Do you have command line access as root or with a sudo user? How exactley did you add the PPA?

What’s the output of

apt policy


dpkg --get-selections | grep php

Is there some management panel like C-Panel or Plesk installed? Many of these panels use their own mechanisms to manage diffrent PHP versions, web server config etc, so it’s possible that even if you were able to add the PPA, it still wouldn’t use the packages you installed from there…

My webhost doesn’t support 22.04 yet, but I use a private disk image with Virtualmin Pro Control Panel, which means that I can add / change whatever ppa’s I want. What’s blocking my upgrade is that I don’t know how to get php8.1-redis module installed on ubuntu 20.04, the isn’t a specific pacakge available from what I can find.

apt policy output:

Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 virtualmin-universal/main all Packages
     release o=. virtualmin-universal,a=virtualmin-universal,n=virtualmin-universal,l=. virtualmin-universal,c=main,b=all
 500 virtualmin-universal/main i386 Packages
     release o=. virtualmin-universal,a=virtualmin-universal,n=virtualmin-universal,l=. virtualmin-universal,c=main,b=i386
 500 virtualmin-universal/main amd64 Packages
     release o=. virtualmin-universal,a=virtualmin-universal,n=virtualmin-universal,l=. virtualmin-universal,c=main,b=amd64
 500 virtualmin-focal/main all Packages
     release o=. virtualmin-focal,a=virtualmin-focal,n=virtualmin-focal,l=. virtualmin-focal,c=main,b=all
 500 virtualmin-focal/main i386 Packages
     release o=. virtualmin-focal,a=virtualmin-focal,n=virtualmin-focal,l=. virtualmin-focal,c=main,b=i386
 500 virtualmin-focal/main amd64 Packages
     release o=. virtualmin-focal,a=virtualmin-focal,n=virtualmin-focal,l=. virtualmin-focal,c=main,b=amd64
 500 focal/main i386 Packages
     release v=20.04,o=LP-PPA-ondrej-apache2,a=focal,n=focal,l=PPA for Apache 2.x,c=main,b=i386
 500 focal/main amd64 Packages
     release v=20.04,o=LP-PPA-ondrej-apache2,a=focal,n=focal,l=PPA for Apache 2.x,c=main,b=amd64
 500 focal/mongodb-org/5.0/multiverse arm64 Packages
     release o=mongodb,a=focal,n=focal/mongodb-org,l=mongodb,c=multiverse,b=arm64
 500 focal/mongodb-org/5.0/multiverse amd64 Packages
     release o=mongodb,a=focal,n=focal/mongodb-org,l=mongodb,c=multiverse,b=amd64
 500 stable-amd64/ Packages
     release a=stable-amd64,c=
 500 focal/stable amd64 Packages
     release o=Docker,a=focal,l=Docker CE,c=stable,b=amd64
 500 focal/main i386 Packages
     release v=20.04,o=LP-PPA-deadsnakes,a=focal,n=focal,l=New Python Versions,c=main,b=i386
 500 focal/main amd64 Packages
     release v=20.04,o=LP-PPA-deadsnakes,a=focal,n=focal,l=New Python Versions,c=main,b=amd64
 500 stable/main i386 Packages
     release o=CISOfy,a=stable,n=stable,c=main,b=i386
 500 stable/main amd64 Packages
     release o=CISOfy,a=stable,n=stable,c=main,b=amd64
 500 focal-security/multiverse i386 Packages
     release v=20.04,o=Ubuntu,a=focal-security,n=focal,l=Ubuntu,c=multiverse,b=i386
 500 focal-security/multiverse amd64 Packages
     release v=20.04,o=Ubuntu,a=focal-security,n=focal,l=Ubuntu,c=multiverse,b=amd64
 500 focal-security/universe i386 Packages
     release v=20.04,o=Ubuntu,a=focal-security,n=focal,l=Ubuntu,c=universe,b=i386
 500 focal-security/universe amd64 Packages
     release v=20.04,o=Ubuntu,a=focal-security,n=focal,l=Ubuntu,c=universe,b=amd64
 500 focal-security/restricted i386 Packages
     release v=20.04,o=Ubuntu,a=focal-security,n=focal,l=Ubuntu,c=restricted,b=i386
 500 focal-security/restricted amd64 Packages
     release v=20.04,o=Ubuntu,a=focal-security,n=focal,l=Ubuntu,c=restricted,b=amd64
 500 focal-security/main i386 Packages
     release v=20.04,o=Ubuntu,a=focal-security,n=focal,l=Ubuntu,c=main,b=i386
 500 focal-security/main amd64 Packages
     release v=20.04,o=Ubuntu,a=focal-security,n=focal,l=Ubuntu,c=main,b=amd64
 500 focal/partner amd64 Packages
     release v=20.04,o=Canonical,a=focal,n=focal,l=Partner archive,c=partner,b=amd64
 100 focal-backports/universe i386 Packages
     release v=20.04,o=Ubuntu,a=focal-backports,n=focal,l=Ubuntu,c=universe,b=i386
 100 focal-backports/universe amd64 Packages
     release v=20.04,o=Ubuntu,a=focal-backports,n=focal,l=Ubuntu,c=universe,b=amd64
 100 focal-backports/main i386 Packages
     release v=20.04,o=Ubuntu,a=focal-backports,n=focal,l=Ubuntu,c=main,b=i386
 100 focal-backports/main amd64 Packages
     release v=20.04,o=Ubuntu,a=focal-backports,n=focal,l=Ubuntu,c=main,b=amd64
 500 focal-updates/multiverse i386 Packages
     release v=20.04,o=Ubuntu,a=focal-updates,n=focal,l=Ubuntu,c=multiverse,b=i386
 500 focal-updates/multiverse amd64 Packages
     release v=20.04,o=Ubuntu,a=focal-updates,n=focal,l=Ubuntu,c=multiverse,b=amd64
 500 focal-updates/universe i386 Packages
     release v=20.04,o=Ubuntu,a=focal-updates,n=focal,l=Ubuntu,c=universe,b=i386
 500 focal-updates/universe amd64 Packages
     release v=20.04,o=Ubuntu,a=focal-updates,n=focal,l=Ubuntu,c=universe,b=amd64
 500 focal-updates/restricted i386 Packages
     release v=20.04,o=Ubuntu,a=focal-updates,n=focal,l=Ubuntu,c=restricted,b=i386
 500 focal-updates/restricted amd64 Packages
     release v=20.04,o=Ubuntu,a=focal-updates,n=focal,l=Ubuntu,c=restricted,b=amd64
 500 focal-updates/main i386 Packages
     release v=20.04,o=Ubuntu,a=focal-updates,n=focal,l=Ubuntu,c=main,b=i386
 500 focal-updates/main amd64 Packages
     release v=20.04,o=Ubuntu,a=focal-updates,n=focal,l=Ubuntu,c=main,b=amd64
 500 focal/multiverse i386 Packages
     release v=20.04,o=Ubuntu,a=focal,n=focal,l=Ubuntu,c=multiverse,b=i386
 500 focal/multiverse amd64 Packages
     release v=20.04,o=Ubuntu,a=focal,n=focal,l=Ubuntu,c=multiverse,b=amd64
 500 focal/universe i386 Packages
     release v=20.04,o=Ubuntu,a=focal,n=focal,l=Ubuntu,c=universe,b=i386
 500 focal/universe amd64 Packages
     release v=20.04,o=Ubuntu,a=focal,n=focal,l=Ubuntu,c=universe,b=amd64
 500 focal/restricted i386 Packages
     release v=20.04,o=Ubuntu,a=focal,n=focal,l=Ubuntu,c=restricted,b=i386
 500 focal/restricted amd64 Packages
     release v=20.04,o=Ubuntu,a=focal,n=focal,l=Ubuntu,c=restricted,b=amd64
 500 focal/main i386 Packages
     release v=20.04,o=Ubuntu,a=focal,n=focal,l=Ubuntu,c=main,b=i386
 500 focal/main amd64 Packages
     release v=20.04,o=Ubuntu,a=focal,n=focal,l=Ubuntu,c=main,b=amd64

dpkg --get-selections | grep php output

php						install
php-apcu					install
php-apcu-bc					install
php-auth-sasl					install
php-bcmath					install
php-bz2						install
php-cgi						install
php-cli						install
php-common					install
php-curl					install
php-fpm						install
php-gd						install
php-gmp						install
php-google-recaptcha				install
php-imagick					install
php-json					install
php-mail-mime					install
php-masterminds-html5				install
php-mbstring					install
php-mcrypt					install
php-memcache					install
php-memcached					install
php-mysql					install
php-net-sieve					install
php-net-smtp					install
php-net-socket					install
php-pear					install
php-phpmyadmin-motranslator			install
php-phpmyadmin-shapefile			install
php-phpmyadmin-sql-parser			install
php-phpseclib					install
php-psr-cache					install
php-psr-container				install
php-psr-log					install
php-ssh2					install
php-symfony-cache				install
php-symfony-cache-contracts			install
php-symfony-expression-language			install
php-symfony-service-contracts			install
php-symfony-var-exporter			install
php-tcpdf					install
php-twig					install
php-twig-extensions				install
php-xdebug					install
php-xml						install
php-zip						install
php7.4						install
php7.4-apcu					install
php7.4-apcu-bc					install
php7.4-bcmath					install
php7.4-cgi					install
php7.4-cli					install
php7.4-common					install
php7.4-curl					install
php7.4-fpm					install
php7.4-gd					install
php7.4-gmp					install
php7.4-igbinary					install
php7.4-imagick					install
php7.4-imap					install
php7.4-intl					install
php7.4-json					install
php7.4-ldap					install
php7.4-mbstring					install
php7.4-memcache					install
php7.4-memcached				install
php7.4-msgpack					install
php7.4-mysql					install
php7.4-opcache					install
php7.4-pspell					install
php7.4-readline					install
php7.4-redis					install
php7.4-soap					install
php7.4-sqlite3					install
php7.4-ssh2					install
php7.4-tidy					install
php7.4-uploadprogress				install
php7.4-xml					install
php7.4-xmlrpc					install
php7.4-xsl					install
php7.4-zip					install
php8.0						install
php8.0-bcmath					install
php8.0-cgi					install
php8.0-cli					install
php8.0-common					install
php8.0-curl					install
php8.0-fpm					install
php8.0-gd					install
php8.0-gmp					install
php8.0-igbinary					install
php8.0-imagick					install
php8.0-imap					install
php8.0-intl					install
php8.0-mbstring					install
php8.0-memcache					install
php8.0-memcached				install
php8.0-msgpack					install
php8.0-mysql					install
php8.0-opcache					install
php8.0-pspell					install
php8.0-readline					install
php8.0-soap					install
php8.0-sqlite3					install
php8.0-ssh2					install
php8.0-tidy					install
php8.0-uploadprogress				install
php8.0-xml					install
php8.0-xsl					install
php8.0-zip					install
php8.1						install
php8.1-apcu					install
php8.1-bcmath					install
php8.1-bz2					install
php8.1-cgi					install
php8.1-cli					install
php8.1-common					install
php8.1-curl					install
php8.1-fpm					install
php8.1-gd					install
php8.1-gmp					install
php8.1-igbinary					install
php8.1-imagick					install
php8.1-imap					install
php8.1-intl					install
php8.1-mbstring					install
php8.1-mcrypt					install
php8.1-memcache					install
php8.1-memcached				install
php8.1-msgpack					install
php8.1-mysql					install
php8.1-opcache					install
php8.1-pspell					install
php8.1-readline					install
php8.1-soap					install
php8.1-sqlite3					install
php8.1-ssh2					install
php8.1-tidy					install
php8.1-xdebug					install
php8.1-xml					install
php8.1-xsl					install
php8.1-zip					install
phpmyadmin					install
webmin-php-pear					install

Hmm, that’s a bit strange. I’m also running Ubuntu 20.04 and I definitely have the php8.1-redis package installed.

What’s the output of…

apt list php8.1-redis

@bb77… I think I just cracked it… when I ran apt list php8.1-redis it had zero output… and although my test prod server are suppose to have the same exact repos… I also ran apt list php8.1-redis on prod and I got a hit:

# apt list php8.1-redis
Listing... Done
php8.1-redis/focal,now amd64 [installed,automatic]

From there I went into Vmin and examined the repos on both prod and test. They were Identical.

Solution: delete and reinstall the same exact repo on my test machine.

After, I did that I got same hit as above…

Between my test server repo misbehaving and the website, quite oddly, not listing php8.1-redis as being available for ubuntu 20.04… I got flustered and made this post.

Now that I can actually install the php8.1-redis module, I should be able to complete my upgrade from here.

Thanks for your help.


That would have been my next suggestion. Glad it worked out. :slight_smile: