Why is virtualmin-lemp-stack dependant on php7.2-fpm?
I want to use php7.4-fpm, however the only way to do that seems to be uninstalling php7.2-fpm, because fpm defaults to the lowest version. However when I uninstall php7.2-fpm and want to later run updates, I get errors saying that virtualmin-lemp-stack dependant on php7.2-fpm.
When I try to update packages via virtualmin, it throws this error: E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution). I’m just nervous if I run this command, it will re-install php7.2-fpm and take down my sites.
Is there any way around this?
Can you explain what you mean by “fpm defaults to the lowest version”? Are you saying Virtualmin is choosing the lowest version or something else is making that decision?
Thanks for your reply Joe!
When I have multiple fpm versions installed, it doesn’t let me select a higher version.
I know fpm doesnt support multiple versions at the moment, but I just want to use 7.4.
Is this possible?
Seems like it should be. I feel like re-check config or validate virtual servers (I don’t remember which) should detect other versions. It’d be buggy if you can’t choose the latest.
I tried re-check config on a few servers, and couldn’t get it to work without force uninstalling 7.2fpm. I’ve been trying to change the version in the virtual server settings. Is there another way to change it?
I just tried again on a new install to use php7.4-fpm, and it defaults to 5.6, even though I setup up the default template in System Settings > Server Templates > Default Settings > PHP Options to FPM and use version 7.4.
When I try changing it, I get this error:
Failed to save PHP versions : The PHP version cannot be changed when in FPM mode
So it seems to me that the only way to use 7.4 is if I uninstall everything lower than it. This is strange.
When you do the re-check configuration, is the 7.4-fpm package listed for fpm?
Yes, it is listed when I re-check it.
Do you use Debian/Ubuntu by any chance?
What happens when you set the php version to highest available?
Because Virtualmin 6.08 doesn’t support detection of PHP 7.4, while Virtualmin 6.09 does. For now, you can use the following work-around.
Thanks. I am using Ubuntu, and I already modified that file. 7.4 shows up, but vmin doesn’t let me use it. It defaults to the lowest version (5.6).
By any chance, does it work on your end?
You need to restart Webmin and run config check afterwards at System Settings/Re-Check Configuration.
To restart Webmin run:
Thank you, but I did that. I tried this on several servers, new and old. Maybe I’m missing something. Can anyone please confirm that this setup works on their end, and how they achieved it?
I am not sure what’s not working for you. You can also choose default PHP version in Server Templates however PHP Versions page should also work.
I suppose that you have chosen FPM execution mode in Website Options?
Yes, I chose fpm and 7.4 in the server templates page on a new server on the lemp stack. Then I created a new server with the default template, however when the server was created, it was set to v5.6 instead of v7.4, and I can’t change it due to the error posted above.
Provide the screenshot please of the error? Do you have execution mode set to FPM in Website Options?
Here are some screenshots:
These are the commands I used to install fpm:
apt-get install -y tmux curl wget php7.4-fpm php7.4-cli php7.4-curl php7.4-gd php7.4-intl
apt-get install -y php7.4-mysql php7.4-mbstring php7.4-zip php7.4-xml unzip php7.4-soap php7.4-redis
apt-get install -y redis
I really appreciate your help!
What do you have on PHP Versions page and what is the output of config check?
Did you try to toggle to FCGId and then back to FPM?
Where did you install PHP 7.4 from?
These are the commands I used when installing fpm:
add-apt-repository ppa:ondrej/php add-apt-repository ppa:ondrej/nginx apt update apt upgrade apt-get install -y tmux curl wget php7.4 php7.4-fpm php7.4-cli php7.4-curl php7.4-gd php7.4-intl apt-get install -y php7.4-mysql php7.4-mbstring php7.4-zip php7.4-xml unzip php7.4-soap php7.4-redis
I also installed redis
apt-get install -y redis
And installed MySQL 8
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb dpkg -i mysql-apt-config_0.8.13-1_all.deb
Here is the PHP versions page
Here is the Configuration Page
@Ilia I can make you an account if you want to check it out for yourself