PHP version not showing

Operating system: debian 8
In the command line via virtualmin if i run the command php -v I get result = PHP 7.2.3-1+0~20180306120140.19+jessie~1.gbp81bf3b

But when I go to “PHP Versions” section in virtualmin it does not show 7.2 as above it only shows 5.6, 7.0 and 7.1.
Is there a reason why its not showing 7.2.3

I found this because I have a problem with a wordpress plugin that states I need to install a PHP module “simpleXML” but on the command line it is listed when running the command php -m

upgrade os… Virtualmin OS Support | Virtualmin

OK I just need to enable PHP 7.2 for my website in question, the php version is installed with all the modules and I check via the command line. It just doesnt appear in apachie or virtualmin in the php versions section. I presume I need to update a file to list the version somehwere? I dont see why I need to upgrade the whole server just to enable PHP version which is actually installed and working. Just to note I have 20 websites running all OK and up and running OK so not wanting to upgrade the server.

I know this is going to sound like a very stupid question, but have you restarted Webmin since you installed the PHP?

Yes,rebooted several times. The php version section in virtualmin has 3 versions available 5.6,7.0 and 7.1 . The command line states I have 4 versions though 5.6, 7.0, 7.1 and 7.2. The command line is actually using 7.2 version. I need my website to use 7.2 but cant select it as its not there in the php versions in virtualmin. Is there a way to get it in there or manually select my website to use php 7.2 ? thanks.

That’s odd. I was thinking that maybe if you hadn’t restarted that the gui hadn’t refreshed to display it.

Long shot but try Virtualmin > System Settings > Re-Check Configuration
Does the PHP version show up there?
If so revisit the PHP Versions section and see if it appears there.

1 Like

OK looking in the file manager I can see etc\php then all subfolders 7.0, 7.1 and 7.2 . In 7.2 folder the folders called fpm and cgi are missing compared to the other 2 php version folders. Will this enlighten someone into how I can fix getting 7.2 for my website? Do I need to get these two missing folders from somewhere?

OK after a lot of digging I need to download the php modules but the download url is no longer available. It appears “jessie” folder which is name for Debian 8 has been removed. Is there somewhere else I can get this folder? otherwise I cant believe Im going to have to upgrade the whole server for the sake of getting one small plugin to work in wordpress because I cant access the upgrade repositry “Index of /php/ jessie main” . If I changed the upgrade repositry link to the stretch (debian 9) and tried to install php7.2 from that would this just break the whole server?

OK sorted it myself !! found an alternative that worked for me. Needed to update my source.list.d/php.list list to:

deb jessie all
deb-src jessie all

then updated php.7.0 on the shell by issuing comands
apt-get -y update php --allow-unauthenticated
apt-get -y install php --allow-unauthenticated

wordpress plugin now happy!

1 Like

This is not correct way and its dangerous, you create a FrankenDebian with non official repos even your command says unauthenticated… No one should follow this ill advice. Once again upgrade your os. There is a reason why it did not worked for you in normal way.

edit: DontBreakDebian - Debian Wiki

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.