Virtualmin showing alternate version in phpinfo()

Operating system: Centos
OS version: 8.3.2011

VM GPL, it came with PHP 7.2 on centOS 8, today I installed PHP 7.4 using this Multiple PHP Versions | Virtualmin .
(Have done multiple time in past with other servers) Everything went fine. Rechecked Virtualmin configuration, it showed new php and added missing php.ini file for me. Switched to new PHP version for a domain and it was working.

However, to verify, I created a phpinfo() file, uploaded it.
Now interesting thing is happening, on each request I am seeing alternate version of PHP, some its showing 7.2 and then next load, 7.4 . I tried multiple refresh and each time PHP version is not same.

Other than that, since its LEMP, I needed few directives changed in php-fpm, so I copied from PHP 7.2 php-fpm data to PHP 7.4 for that domain. (initially PHP 7.4 fpm file was empty)
Example : /etc/php-fpm.d/159385722838518.conf

May be I messed something here but no idea.

Hi,

The problem most likely is in your network or DNS configuration.

That would be interesting if its DNS / network issue.

May be I hadn’t explained properly:

  1. On Centos 8 with Nginx, installed PHP 7.4 (default came 7.2)
  2. Re-checked virtualmin Config,
  3. Changed PHP to 7.4 for a server (domain)
  4. On checking through phpinfo() , on every page load, I am seeing either php 7.2 or 7.4

In my view, PHP-FPM is loading random PHP version but you are expert. Please let me know how it could be related to DNS or network ?

I assume Ilia is suggesting you’re seeing two different virtual servers (both of which happen to have phpinfo on the same path), because DNS is serving different IPs. That wouldn’t be my first guess, but I guess it could happen.

But, I honestly don’t know how it could switch on each request. There’s no mechanism for that to happen within the same domain. I mean, it’s hard-coded proxy config in nginx, and connecting to a long-running FPM server. Nothing in that changes on each request, so I have no idea how you’re getting different ones on alternating request.