Multiple PHP versions blog

General Forum
User avatar
jeejeestudio
Phoca Professional
Phoca Professional
Posts: 113
Joined: 12 Feb 2008, 13:44
Location: Netherlands

Multiple PHP versions blog

Post by jeejeestudio »

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?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48378
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Multiple PHP versions blog

Post by Jan »

Hi,

hmmm, hard to say, I am running Kubuntu 24.04 - everything is working OK with 7.4, 8.2 and 8.3.

Which error exactly do you get when adding the repository. Maybe there is some new updated. :idea:

Jan
If you find Phoca extensions useful, please support the project
User avatar
jeejeestudio
Phoca Professional
Phoca Professional
Posts: 113
Joined: 12 Feb 2008, 13:44
Location: Netherlands

Re: Multiple PHP versions blog

Post by jeejeestudio »

Hi Jan,

I'm getting this:

Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 362, in <module>
sys.exit(0 if addaptrepo.main() else 1)
^^^^^^^^^^^^^^^^^
File "/usr/bin/add-apt-repository", line 345, in main
shortcut = handler(source, **shortcut_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 40, in shortcut_handler
return handler(shortcut, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 86, in __init__
if self.lpppa.publish_debug_symbols:
^^^^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 126, in lpppa
self._lpppa = self.lpteam.getPPAByName(name=self.ppaname)
^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 113, in lpteam
self._lpteam = self.lp.people(self.teamname)
^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'people'

and after the above changes which I found on the mentioned site, I could install the php versions.
I switched to the single board due to change of computer and have no Ubuntu installed (yet).

Only thing to figure out is why it does not select the other PHP versions. I will throw a question on the Armbian forum, see if there is a solution.

Thanks!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48378
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Multiple PHP versions blog

Post by Jan »

OK, will be great to paste an answer when you find it.

Thank you, Jan
If you find Phoca extensions useful, please support the project
Post Reply