Workaround for PHP 8.1 on Debian, anyone?

As you know, IcingaWeb2, up to version 2.9.5 (the last one released) completely fails with PHP 8.1. Since Debian “unstable/sid” now installs PHP 8.1 by default, IcingaWeb breaks.

Did anyone compile a HOWTO explaining how to workaround this problem on a Debian machine? One probably needs to install old PHP 7.4 Debian packets, then marking them as Hold, or something like that but I would appreciate actual instructions.

I hope I have understood your question correctly. I have performed the following installation steps to install the desired PHP version. I currently have several versions installed as well.

I think I got my information from this site: How To Install PHP 7.4 on Debian 10 / Debian 9 | ComputingForGeeks

at the first one you must download and store the ppa repository.

sudo apt -y install lsb-release apt-transport-https ca-certificates 
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg

now add Repository:

echo "deb $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list

Install PHP7.4

sudo apt -y install php7.4

Install additional PHP Packages:

apt-get install php7.4-xxx


sudo apt-get install php7.4-{bcmath,bz2,intl,gd,mbstring,mysql,zip}

I do not know of a workaround for php8.1.

This is not going to work, as there are no packages for bookworm:

Err:7 bookworm Release                                                     
  404  Not Found [IP: 443] 

without bookworm and Release?

What do you mean ? This was an apt output ( not URL with spaces ), it tries to find file

which does not exists, only packages for Index of /php/dists/ are available ( bullseye, buster,stretch ), what do you suggest to put in /etc/apt/sources.list.d/php.list then ?