Multiple PHP versions blog
Posted: 09 Jun 2024, 13:06
Hi,
I think this excellent and much helping blog https://www.phoca.cz/blog/1302-running- ... untu-linux needs an update.
Because else one is not able to install the php edition as the Andrej repository does not work.
This part sudo add-apt-repository ppa:ondrej/php -y gives errors.
So what I found from this site : https://www.how2shout.com/linux/install ... ux-server/
I added:
sudo apt install wget gnupg2 lsb-release
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt update
After this, one can start adding the PHP versions like php8.0 php8.2 php8.3 (need 8.0 for Joomla3)
(Note that I had it running on Ubuntu 22.04 perfectly following your tutorial,
but with Armbian on a Single ARM Board it did not work.)
Now all installed fine and I followed the rest of your blog,
the thing that is now not working are the different php versions per site8x.test
I only get php8.2.16 on each site8x.test, so somehow it does not use the conf files at sites-available.
It seems this sites-available is not honoured somehow but is available in 000-default.conf.
of course I restarted php and apache2 multiple times.
Any idea what could be different or why it does not use the different php versions, but only php 8.2.16?
I think this excellent and much helping blog https://www.phoca.cz/blog/1302-running- ... untu-linux needs an update.
Because else one is not able to install the php edition as the Andrej repository does not work.
This part sudo add-apt-repository ppa:ondrej/php -y gives errors.
So what I found from this site : https://www.how2shout.com/linux/install ... ux-server/
I added:
sudo apt install wget gnupg2 lsb-release
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt update
After this, one can start adding the PHP versions like php8.0 php8.2 php8.3 (need 8.0 for Joomla3)
(Note that I had it running on Ubuntu 22.04 perfectly following your tutorial,
but with Armbian on a Single ARM Board it did not work.)
Now all installed fine and I followed the rest of your blog,
the thing that is now not working are the different php versions per site8x.test
I only get php8.2.16 on each site8x.test, so somehow it does not use the conf files at sites-available.
It seems this sites-available is not honoured somehow but is available in 000-default.conf.
of course I restarted php and apache2 multiple times.
Any idea what could be different or why it does not use the different php versions, but only php 8.2.16?