How to install php extension in multiple php installaion

OS type and version AlmaLinux
Webmin version 1.994
Virtualmin version 7.o
Related packages php extension

I have php 7 and 8 installed on my system and I can choose the one I want for a specific server.
I installed an extension intl but it is not showing on the second version of php 8. Please how do I install it targeting the second php installation which is php 8. Remember the extenion is there in the system but not showing up on my second php8 that I am using in laravel app. I useddnf list installedto check if its installed and its there in the list but not in php8 version. I installed with sudo dnf -y install php-intl`
Please how do I make it be recognized on second php installation


Extensions are version specific. You need to install the individually.

Keep in mind, some extensions don’t exist in 7 that are available in 8 and vise versa.

Please how do I install extension to target a specific php version for instance php8

I have tried but no luck

Did you install repo
dnf -y install && dnf clean all
dnf -y install php80-php-{cli,pdo,fpm,zip,gd,xml,mysqlnd,opcache}

Like I said…They are there in the system but not on php8 where its needed. I have two versions of php. thats php 7 and 8.
When I install things for php8 it gets to 7 which I dont know how to target only php8.

In VM?

I only use php8 on one particular site which requires it. So its set only to the site like you showing

So its working ok then?

Yes it works. But that is not what I am saying.
What I mean is that the extension like php intl, php cli that site on php8 requires isnt available for php8.
They are currently installed but not available in php8 and thats where its needed to make the app in php8 function well.
Now the extensions are installed but not in the correct php version.
Thats the challenges

I don’t know much about those extensions, by you screenshot cli is already installed. A search on the forum suggests yum install php80-php-intl for intl

Ok. What I need is guide on how to make the extension available for php8 and not php7.

Not sure what you mean. If you have selected 8.0 for the domain then it should work.

The above two are what I want to install in php8

Try restarting php

Otherwise I have no idea :slight_smile:


I can over a screen sharing session install and show you in greater detail how to install extensions for specific versions of PHP, however my time would not be free at this time as my schedule is quite busy.

That being said as a first session I’d honor my Virtualmin introductory rate of $40 CAD per hour an estimate the session would be no more then an hour unless you wanted to cover other topics.

Depending on your timezone, I could make some time available in 6-12 hours from now.

Let me know if you’d like to proceed.

Well, I have looked for how to install extensions for specific versions of PHP but found none… I was thinking it will be good to share the steps here so that others who experience the same issues can learn from.

Remi’s RPM repository (
EDIT: @mesh **try better glasses. :wink: to read and maybe search. t

the dot for example…


I mean this good so not as harassment or so. haha.

Dutch kind of joking when people does things not 100% right.

1 Like

Ok. let me check the link