List the PHP versions of all servers

3 posts / 0 new
Last post
#1 Tue, 04/25/2017 - 05:02
amityweb

List the PHP versions of all servers

How am I able to list all servers and the PHP version its using? Without having to go into every server setting and see whats its configured to use.

Thanks

Tue, 04/25/2017 - 08:45
andreychek

Howdy,

You can obtain that information using the Virtualmin command line tools.

If you run this command:

virtualmin list-domains --multiline

You'll get a lot of output, but look for the names "PHP version" in the output to see the version in use for each domain.

-Eric

Wed, 05/03/2017 - 10:19
amityweb

ok thanks!

But I have since thought of another way... because each virtual server's etc/php.ini file is a symbolic link to the actual php.ini file, you can run the following which shows you what file php.ini points to, and therefore establish the PHP version in use, so I this is easier to work with, I can copy the output into a spreadsheet and remove the bits I dont need:

find -L /home/*/etc/php.ini -xtype l -exec ls -l {} \;

Topic locked