Matteo.
The Virtualmin version is 4.18.gpl. I have the exact same LAMP set up on the development and production servers but it is only the development server that gives this error message when I go to check the environment to install Moodle 3.0.
So I did as you suggested and created the simple PHP page and ran it from my browser. I was then able to the compare the print out with my Moodle's PATH_INFO. I went through both line-by-line but there was no difference between them.
I'm beginning to think the best thing to do is to rebuild the server and install 3.0 from scratch since I don't seem to be able to get past that error message.