Multiple php versions

Hello all,

at first thank you for that great forum! I read a lot, but i stuck at one thing…

I came from debian based linux, i´m developing php software. The problem is that i need to switch between php 7.0, 7.2, 7.3, 7.4 and 8.0. Is there any solution to do so?

On debian i could set that with different fpm version per vhost. I developing on my notebook with manjaro KDE.

Thanks for any hint!


Works the same way with Manjaro. Older PHP packages are in the AUR.

1 Like

I use docker


thanks for your answers!

@papajoke i liked to use it without docker

@Deano i tried to install it (php73, php74 ) with yay or over gui but i always got an error that there are no gpg keys on the server

did i make a mistake, or is there a better way to install AUR packages ?

Thanks a lot!

There are several ways to install AUR packages. I personally use something like pamac build php74 on the command line, but I guess yay or GUI should work also. The gpg keys problem has nothing to do with php, it’s more of a general problem. But I’m sorry, I don’t know how to solve that.

1 Like

Either it was some kind of coincidence or it was the solution of the gpg key problem:

sudo pacman-key --refresh-keys

My last problem now is that I can run composer for the particular version php version. There I still get the error that I use php version 8. Any idea how i could use composer for php 7.2 ?

Have you tried php72 composer.phar? Have a look at /usr/bin, there should be all installed php binaries.