This is new for me, so I hope someone can shed some light on this.
I install all packages frequently. Some days ago, I saw new packages available for php 8.2, which is the only version I am running. I had no time to install en test yet. But today, I saw the number of packages available is doubled.
For example:
php-cli (New version 8.2+93+0~20231125.47+debian11~1.gbpc7171d)
but also:
php8.2-cli ( New version 8.2.13-1+0~20231124.37+debian11~1.gbp42a939)
and:
php-redis (New version 6.0.2-1+0~20231125.55+debian11~1.gbp9f3071)
but also:
php8.2-redis (New version 6.0.2-1+0~20231125.55+debian11~1.gbp9f3071)
What would be the best to do here? Is this just normal behavior? Install all at once?
Those are not the same packages. They aren’t “double”.
I would assume you’ve enabled one or more additional repositories to get newer PHP versions, but also the Debian standard repo already has a PHP 8.2 version in it. You then installed php8.2- packages (the Virtualmin installer would have installed php- packages without a version specified) alongside the version already installed.
When a package is named like this, it is so that it can coexist with the standard packages without conflicting and you can use either one. I personally wouldn’t want two different PHP versions of the same major version. It’s just more complexity for no good reason.
So I did not installed correctly when setting uit the server. I thought when it was running after a fresh install, the php7 was the default one. So in short I did, looking in my notes:
sudo apt install php-curl (maybe this had to be php8.2-curl?)
sudo apt-get purge php7.*
And thought I had only 8.2 left.
If I understand correctly, this is not entirely the case. I will dive into it tomorrow to see how I can unwrap this. Indeed I prefer only a single PHP version on the system.
It’s possible you have the Debian unstable or testing repos enabled, which would be a “rolling” repository. Even if you started with PHP 7.x, you’d end up with PHP 8 eventually. I can’t recommend doing that, as there will be incompatibilities that will bite you when major versions of software changes. You should be very selective about what packages you upgrade across major versions…you need to plan for it.
I see. I think this must be the case. When Clicking update the default php packages, it shows what is going to be updated, and this also shows php 8.3. So I guess the default php version on the system is the rolling repository?
After updating all the packages, I now indeed see at the Tools → PHP configuration page:
However, I cannot choose this 8.3 version in a virtual server Server Configuration → PHP Options. This only shows PHP version 8.2.13. Which is correct, since the 8.3 is only the cli version I guess.
I have no problems at all on this server. Is there a pressing need to remove the default version? I’m not sure what the effects of this would be.