PHP Config paths are wrong by default

Operating system:
Ubuntu 20.04 LTS

Fresh install on new machine.

Webmin > Tools > PHP Configuration
Global PHP Configuration Files

They’re paths for PHP5. Ubuntu 20.04 doesn’t ship with PHP5, never has.

These all need to be replaced with:

/etc/php/7.4/apache2/php.ini=Configuration for mod_php
/etc/php/7.4/cgi/php.ini=Configuration for scripts run via CGI
/etc/php/7.4/cli/php.ini=Configuration for command-line scripts
/etc/php/7.4/fpm/php.ini=FPM

Odd. I have the exact same setup and that didn’t happen. (Other than mod php. I wouldn’t touch that with a 10 foot pole.)

If you say it’s a fresh install then it must be but it smells like it was not.

1 Like

I’d love to know what I’m doing different, as we have some 30 servers, and the ones on Ubuntu over the years have always had this issue.

Fresh machine, Linode 4Gb VPS set up this morning with Ubuntu 20.04. Though this is a regular thing when we use Webmin, and it’s always set up from scratch.

Then you’re doing it wrong. Is it a plain, untouched, unmodified Ubuntu install or are you adding things to the OS before you install Virtualmin?

Granted, I’ve not done anywhere near the installs you have (a total of 9) but I have never, ever had an issue.

Any time I see an issue posted like this, it always comes back to someone installed Ubuntu, then installed some other things on Ubuntu or configured Ubuntu in some way and THEN installed Virtualmin and that is where it always goes all wrong.

I must be, but unsure what.

So when I set a new server up, I provision the server in Linode with a generic Ubuntu 20.04 image.

I’ll then ssh into it and run an apt-get update && apt-get upgrade to ensure it has the most recent core packages.

I set the hostname, and update the hosts file so that the IPv4 and IPv6 addresses resolve.

I then run the VirtualMin install script.

Once that completes I’ll run apt-get install php-curl php-imagick php-gd php-intl php-zip php-soap jpegoptim optipng webp as I know we always need these, and this should be done after install.

Next I a2enconf php7.4-fpm && systemctl reload apache2

Then install Composer.

Then log into Webmin, and run through the Post-Install Wizard. I then have to adjust a lot of stuff, but the PHP config will now be referencing PHP5 paths.

Wrong.

From the install instructions:

Do not pre-install or pre-configure any additional packages on your OS. The installer expects a freshly installed, supported, OS, and anything you do differently may cause conflicts or configuration errors. If you will be enabling third-party package repositories, do so after installation of Virtualmin, and only with extreme caution.

You install Ubuntu then install Virtualmin COMPLETELY including the post install wizard. You do NOT do anything in between the two.

https://www.virtualmin.com/download/

1 Like

An update is not “additional packages” and the installer runs before I do add any new ones… ahhh, you think it’s a condition that you have to run through the Post Install thing first?

God that’s going to add some more new steps to things. Ok, next time I set a server up I’ll try that, thanks.

That is why it tells you in plain, highlighted, emphasized English NOT to do ANYTHING in between the two.

Yes, except that language is wrong. It’s a POST install wizard. I’ve already installed when I do my own stuff… I just haven’t run the “post install” wizard. If it’s not actually “post install” but “still installing” it shouldn’t be called a post install wizard, or should be stated you need to run that to consider everything installed.

Config is not installing.

Then continue to have problems. Have fun.

Edit to add: it’s a post install CONFIGURATION wizard.

My man, I am not arguing with you, and I’m grateful for the help - you’ve likely cleared up what’s going wrong. I asked for help, got it, accepted it, said I’d try it next time, then pointed out the language is bad in the UI and instructions.

How is the language “bad”? It’s perfectly stated. Here is what Virtualmin tells you to do in very plain English:

Install Ubuntu.
Don’t touch Ubuntu.
Install Virtualmin.
Run Virtualmin Configuration.
Done.

Here is what you’re doing:
Install Ubuntu.
Update Ubuntu.
Configure Ubuntu with host name and files and resolve IPv4 and IPv6.
Install Virtualmin.
Install Curl
Install imagick
Install gd
Install intl
Install zip
Install soap
Install…well, you get the picture by now.

Then you run the configuration wizard on top of a system you’ve already tried to configure and installed items on that should not be there and you come here to complain that the installer has problems.

Nobody has these problems that follow the very simple instructions. It is ALWAYS, as I said from the start, someone that tries to install and configure their OS and doesn’t allow Virtualmin to do it.

Always.

I’m not getting into an argument with you. Thanks for the help.

If the Webmin team would like to clarify their language and terminology, great.

It’s possible Webmin has old paths in its config, and Virtualmin fixes it later (during config check, probably). You shouldn’t need to do anything, though.

Yeah, looking at the config files for phpini, it does seem to have old stuff: webmin/config-debian-linux-4.0-ALL at master · webmin/webmin · GitHub (that applies to all Debian-derived distros, and quite old, but I guess it Just Worked until somewhat recently). Pretty sure Virtualmin fixes it, if you let it, though.

I’ll let @Jamie know we should update that for newer Debian/Ubuntu versions.

1 Like

Thanks Joe. Sounds likely it’d be getting fixed as part of the “post install” config then; that makes a kind of sense.

Either way, I’ll remember to include “run the post-install wizard” as part of “installing” before I set other stuff up in future.

Cheers again!

Not really related to the issue but with regards to the discussion:

To update existing packages before the post installation isn’t really “configuring or installing additional packages” though.

I have been installing and configuring Virtualmin in quite a few servers myself and an apt update && apt upgrade or say, setting up ssh keys won’t really mess up the post-installation. Different hosts provide different templates anyway so in most cases, it won’t make sense for an apt update/upgrade to create issues with the Virtualmin installation.

And with regards to installing packages, I do admit that I “occasionally” break the rules and would say, apt install vim on certain servers where the template might not have it by default before installing Virtualmin and running the post installation.

It depends on what the package being installed does/will do really. Installing vim might not break Virtualmin but there are thousands of other packages that will though so it’s generally a good idea and also mentioned in the Virtualmin installation instructions to avoid installing/configuring packages before installing and setting up Virtualmin since the Virtualmin team can’t really test each and every package out there for compatibility issues with the Virtualmin installation script or Virtualmin itself.

Yeah for sure - it makes sense when you know what is meant by “installed”. What led me wrong was that I thought when the shell script for installing had completed that was “everything installed” and we were then safe to add other packages (like the various required php extensions I always need, and add then).

Turns out that isn’t “finished installing” and to do that you need to run the “Post installation wizard”. It’s the terminology that threw me off, I was following the instructions to the letter, but the letter isn’t as clear as it seems - you need to install and run the post install wizard before you do anything else.

You can see why that doesn’t seem like a part of the install when its named as it is, and is a separate UI entirely from the shell script which was doing the actual installing.

2 Likes

It’s mostly done when the install script is done, but there are a few things left for the post-install wizard and the config check (I think this is a config check thing). So, the further along in the process you get before you start installing/configuring other stuff, the less likely you are to do something that will interfere.

You’re not wrong, the language is a little unclear. And…I’m kind of uncomfortable with so much happening in the config check and in the wizard. The setup wizard was supposed to ask, like, a handful of questions that couldn’t reasonably be handled with reasonable defaults, and then we got a bunch of requests to expand it with other options (that probably should have stayed in the regular configuration workflow) and we added stuff along the way (that maybe should have been handled with reasonable defaults) and now it’s a ridiculously long process that is kinda confusing for new users.