Create New Server - AUto Install WP - Error

SYSTEM INFORMATION
OS type and version Ubuntu 22.04.5
Virtualmin version 7.20.2

Auto installing WP on a new server used to work fine, but now it has stopped, with the install error:

Installing third-party web apps …

Installing wordpress version 6.6.2 …
Checking PHP modules …
Installing required PHP mysqli module …
… could not find domain’s php.ini file
… done

I can install WP manually!

I added PHP 8.3 (using 8.1) and made that the standard, but that did not help.

There is a similar help topic a month or so ago, but this is a different error!

Sorry, just reposted under a separate topic!

Forgot to mention - manual install of WP via web apps works fine

There are a few older similar posts, but no solution.

This feature did work, but now does not!

I need to resolve ‘could not find domain’s php.ini file’

Are you using ‘jail’?

Up to date Debian 11.

root@main:/etc/php/8.4/mods-available# locate php.ini
/etc/php/7.3/apache2/php.ini
/etc/php/7.3/cli/php.ini
/etc/php/7.3/fpm/php.ini
/etc/php/7.4/cgi/php.ini
/etc/php/7.4/cli/php.ini
/etc/php/7.4/fpm/php.ini
/etc/php/8.2/cgi/php.ini
/etc/php/8.2/cgi/php.ini.ucf-dist
/etc/php/8.2/cli/php.ini
/etc/php/8.2/cli/php.ini.ucf-dist
/etc/php/8.2/fpm/php.ini
/etc/php/8.2/fpm/php.ini.ucf-dist
/etc/php/8.3/cgi/php.ini
/etc/php/8.3/cgi/php.ini.ucf-dist
/etc/php/8.3/cli/php.ini
/etc/php/8.3/cli/php.ini.ucf-dist
/etc/php/8.3/fpm/php.ini
/etc/php/8.3/fpm/php.ini.ucf-dist
/etc/php/8.3/phpdbg/php.ini
/etc/php/8.3/phpdbg/php.ini.ucf-dist
/etc/php/8.4/cli/php.ini
/etc/php/8.4/phpdbg/php.ini
/usr/lib/php/7.4/php.ini-development
/usr/lib/php/7.4/php.ini-production
/usr/lib/php/7.4/php.ini-production.cli
/usr/lib/php/8.2/php.ini-development
/usr/lib/php/8.2/php.ini-production
/usr/lib/php/8.2/php.ini-production.cli
/usr/lib/php/8.3/php.ini-development
/usr/lib/php/8.3/php.ini-production
/usr/lib/php/8.3/php.ini-production.cli
/usr/lib/php/8.4/php.ini-development
/usr/lib/php/8.4/php.ini-production
/usr/lib/php/8.4/php.ini-production.cli

Thanks for the response - I am running Ubuntu with:

/etc/php/7.1/cli/php.ini
/etc/php/7.3/cli/php.ini
/etc/php/8.1/cli/php.ini
/etc/php/8.3/cli/php.ini
/etc/php/8.4/cli/php.ini
/etc/php/7.1/fpm/php.ini
/etc/php/7.3/fpm/php.ini
/etc/php/8.1/fpm/php.ini
/etc/php/8.3/fpm/php.ini
/etc/php/7.1/cgi/php.ini
/etc/php/7.3/cgi/php.ini
/etc/php/8.1/cgi/php.ini
/etc/php/8.3/cgi/php.ini
/etc/php/8.1/apache2/php.ini
/etc/php/8.3/apache2/php.ini

Servers default to 8.3 fpm

I don’t use this feature so I don’t know much about it but if you are running chroot jails then you may need to put these in your jail environment?

root@main:/home/list# ls
  cgi-bin         l  tmp
awstats                etc      homes                       Maildir  public_html     virtualmin-backup
root@main:/home/list# cd etc
root@main:/home/list/etc# ls
php7.4  php8.2  php.ini

Checking random home directories these seem to appear by default. Any chance you tinkered with templates?

Just a heads up, unrelated to the issue under discussion (despite my usual discouragement of changing the subject): Y’all both have some PHP 7 versions installed. If those package didn’t come from your OS repos, and instead came from a third party (like Remi/Sury/Ondrej), those packages are unmaintained and likely a security risk. Those third-party repos maintain the software as long as the upstream maintains it, but PHP 7 reached EOL more than a year ago.

1 Like

Well, auto install error and PHP. The reason I have few versions of 7 is the GPL scripts for the PHP database programs. Jus sayen… :wink:

Which one(s) specifically? We shouldn’t offer to install applications that require an EOL PHP version.

Took a moment to check most of them. Looks like phppgadmin is the only one suspect. Others look maintained or specifically mentioned php8 support.

OK, I’ll start another topic about that, so this one can get back to the original subject.

Edit: A thread about the problem already exists.

Jailkit is running (automatic at setup?) but it only looks like programs are involved, not servers.

Not sure why but locate doesn’t seem to list /home/domain/etc php.ini files until I run it fresh. Weird. But as I said above, it appears all of my domains have an /etc/php.ini file.

I’m not sure what the difference in the install script vs manual install would be though. I don’t mess with jailkit. It was meant for setting up programming environments originally. One day a programmer noticed a hacker had gained access to one of his ‘jails’ and watched them. The hacker not knowing he was in a chroot environment didn’t get too far. Suddenly chroot was seen as hack protection. It is only for the truly inept hacker I guess?

After a little digging, on a server, the php.ini is a symbolic link to php8.3/php.ini, which is held in the same folder /home/server domain/etc/php8.3 and there is a php.ini in there…

No idea what that means!

If it has the correct permissions, and isn’t empty, then I’,m out of good guesses.

So bad guesses? :wink:

I installed from an account with root permissions so I logged in as the user and tried again. Again, it installed. I wouldn’t think jail would prevent you from going up one directory to the /etc/ file, but I don’t know that. I thought it would just keep you in home.

I have only installed as root and, up until a few months ago, it worked fine!

Bain of my life … I delete the symlink in the users home directory etc/php.ini as it can trash allsorts of things both cli and http but it is what it is and you work around it