CentOS7: I installed the php package 7.2, but I was unable to apply the version to my site (actual php 5.6)

Doc:
virtualmin com/documentation/web/multiplephp

But
In System Settings -> Server Templates -> Default -> PHP Options:

Default PHP exection mode: I just see: Apachemod_php

Where are the other 2 options as in the image? (CGI wrapper and FCGId?)

And in Virtualmin -> Server Configuration -> PHP Versions:

This virtual server is using the mod_php execution mode for PHP, such does not allow per-directory version selection.

And I don’t see the option to change the php version.

Checking Configuration

he status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active …

Your system has 58.82 GiB of memory, which is at or above the Virtualmin recommended minimum of 256 MiB.

BIND DNS server is installed, and the system is configured to use it.

Mail server Postfix is installed and configured.

Postfix can support per-domain outgoing IP addresses, but is not currently configured to do so. This can be setup in the Postfix Mailserver module.

SuExec cannot be used to run PHP scripts in CGI or FCGId modes : The Suexec command on your system is configured to only run scripts under /var/www, but the Virtualmin virtual server home directory is /home. CGI scripts run as domain owners will not be executed.

The following PHP versions are available : 5.6.40 (/bin/php-cgi), 7.2.24 (/opt/rh/rh-php72/root/usr/bin/php-cgi), 5.6 (mod_php)

The following PHP execution modes are available : mod_php

No PHP-FPM packages were found on this system.

Webalizer is installed.

MariaDB 5.5.64 is installed and running.

Logrotate is installed.

Using network interface eth0 for virtual IPs.

Default IPv4 address for virtual servers is #######.

Quotas are not enabled on the filesystem / which contains home directories under /home and email files under /var/spool/mail. Quota editing has been disabled.

Shell /bin/false for FTP users is not included in /etc/shells, which may prevent FTP access.

All commands needed to create and restore backups are installed.

The selected package management and update systems are installed OK.

Chroot jails are not available : The Jailkit command jk_init was not found on your system - maybe the jailkit package is not installed?

… your system is ready for use by Virtualmin.

Thanks.

Make sure to use the latest virtualmin version. I read about issues with the 6.0 version on CentOS with that particular issue. I think the latest is 6.09.
And you shouldn’t use mod_php if possible.

1 Like

How did you install Virtualmin? This does not look like you used the Virtualmin install script.

Hi @DrCarsonBeckett - Thank you!

Sorry, I forgot to send the other part of the data

Operating system CentOS Linux 7.7.1908
Webmin version 1.941 Virtualmin version 6.09
Authentic theme version 19.45 Time on system [Monday, April 13, 2020 5:10 PM](mydomain :10000/time/)
Kernel and CPU Linux 3.10.0-1062.el7.x86_64 on x86_64 Processor information Intel® Xeon® CPU E5-2630 v4 @ 2.20GHz, 10 cores
System uptime [1 days, 22 hours, 04 minutes](mydomain :10000/init/) Running processes [168](mydomain :10000/proc/index_tree.cgi)
CPU load averages 0.07 (1 min) 0.07 (5 mins) 0.12 (15 mins) Real memory 833.57 MiB used / 419.69 MiB cached / 58.82 GiB total
Local disk space 84.16 GiB used / 1.45 TiB free / 1.53 TiB total Package updates [All installed packages are up to date](mydomain :10000/package-updates/index.cgi?mode=updates)

Hi @Joe
I followed this link:
https://www.virtualmin.com/download.html

The easiest way to get the install script onto your server, is to login to your server and use wget or curl. For example:

# wget http://software.virtualmin.com/gpl/scripts/install.sh

[…]

I’ve tried to reinstall and the server has also tried to install, but the same problem happens and they don’t support it.

Do I have to change any settings?

Step back. You must have had some errors during installation. You don’t have a complete installation, according to the status above. So, how about we worry about why your installation failed and fix that, rather than trying to manually fix things in piecemeal fashion.

So, what errors did you get during installation?

1 Like

Thank you!
Can I reinstall to see the errors? I don’t remember.
Should I reinstall webmin too or just virtualmin?
Do you suggest a better way to delete everything from the server and return from scratch?

latest script is 6.1.1 (just reinstalled this afternoon)

yes it does that in the template. Choosing 7.2.2 and not highest will select 7.2 at next virtual server template.

turnarounds that works :roll_eyes:

choose PHP FPM
and 7.2.2

go to the shell :roll_eyes:

  1. stop PHP-FPM service (it is php fpm 5)
    systemctl stop php-fpm.service
  2. start php fpm 7
    systemctl start rh-php72-php-fpm

verify it
systemctl status rh-php72-php-fpm

check if it works (remember, it is <?PHP tags by default), not short <?

enable it for good or it wont restart the next time :
systemctl enable rh-php72-php-fpm

verify that in virtualmin welcome page :roll_eyes:


and now

1 Like

No, don’t reinstall (unless/until we see that something went very wrong during install).

Look in /root/virtualmin-install.log for errors. It’s harder to spot errors in the log (because during the install script errors show up as a red X in the installation/configuration steps, while successful steps are green checkmarks), but there’s more information in the log.

1 Like

this looks like a messed up install, unless it doesnt detect PHP FPM not started ?

1 Like

Thank you very much @Joe, FabGilette, @DrCarsonBeckett

You’re right. For some reason the default installed version of the server was the most recent 6.09, but only with php 5.6 and without SSL Lets Encrypt and some other problems, which makes me think that the server does not have good faith. They do this to hire their paid support (per hour) or migrate to WHM/cPanel which is the monthly paid version and they earn commission.

I reinstalled and everything worked fine. Now I will migrate my backup from the old server, but it looks like everything is perfect now. I will recommend to all my clients to use Webmin / Virtualmin

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active …

Your system has 58.82 GiB of memory, which is at or above the Virtualmin recommended minimum of 256 MiB.

BIND DNS server is installed, and the system is configured to use it.

Mail server Postfix is installed and configured.

Postfix is configured to support per-domain outgoing IP addresses.

Apache is installed.

The following PHP versions are available : 7.2.24 (/opt/rh/rh-php72/root/usr/bin/php-cgi), 7.3.16 (/bin/php-cgi), 7.3 (mod_php)

The following PHP execution modes are available : mod_php cgi fcgid fpm

The following PHP-FPM versions are available on this system : 7.3.16 (php-fpm) 7.2.24 (rh-php72-php-fpm)

PHP versions have changed to 7.2, 7.3, 7.3 since last check. Regenerating any missing php.ini files.

Webalizer is installed.

Apache is configured to host SSL websites.

MariaDB 5.5.64 is installed and running.

ProFTPD is installed.

Logrotate is installed.

SpamAssassin and Procmail are installed and configured for use.

ClamAV is installed and running.

Using network interface eth0 for virtual IPs.

Default IPv4 address for virtual servers is #####.

Both user and group quotas are enabled for home and email directories.

All commands needed to create and restore backups are installed.

The selected package management and update systems are installed OK.

Chroot jails are available on this system

… your system is ready for use by Virtualmin.

Updating all Webmin users with new settings…
… done

Re-loading Webmin …
… done

You’ve got mod_php installed, which is pretty strongly discouraged (by the PHP upstream developers), unless you absolutely have to use it for some app that can only work with it. In addition to having some security concerns on a multi-tenant system, it’s also more resource intensive and slower than PHP-FPM or fcgid.

I wonder why you got 7.3 and not me. (did 2 installs todays, both on centOs 7 and at two different providers.)

It didn’t come from the install script. It appears to have been manually installed.

Yes, I had done many tests and ended up getting lost. I have already uninstalled 7.3 and mod_php.

Thanks for the alerts

a question, can I run this command?
sudo yum remove mod_php

or do I have to remove it in another way?

No, the package is named something else, bu I can’t guess what. In the standard OS repo it is in php, in the SCL repos it is in rh-php72-php. Wherever you got it from will determine what it’s called.

You can try to figure it out with:

# yum provides */httpd/modules/*php*

This will take a while to run, as that’s a complex pattern, but there are multiple possible mod_php.so locations. You can try going the other way with:

# locate libphp
# rpm -qf <path to libphp7.so>

You don’t need to install it to disable it. You can just edit the config file that’s loading it in /etc/httpd/conf.modules.d. It takes a lot of memory to have it enabled in Apache, which is wasted if you aren’t using it.

1 Like

Perfect! Thank you

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active …

Your system has 58.82 GiB of memory, which is at or above the Virtualmin recommended minimum of 256 MiB.

BIND DNS server is installed, and the system is configured to use it.

Mail server Postfix is installed and configured.

Postfix is configured to support per-domain outgoing IP addresses.

Apache is installed.

The following PHP versions are available : 7.2.24 (/opt/rh/rh-php72/root/usr/bin/php-cgi), 7.3.16 (/bin/php-cgi)

The following PHP execution modes are available : cgi fcgid fpm

The following PHP-FPM versions are available on this system : 7.3.16 (php-fpm) 7.2.24 (rh-php72-php-fpm)

PHP versions have changed to 7.2, 7.3 since last check. Regenerating any missing php.ini files.

Webalizer is installed.

Apache is configured to host SSL websites.

MariaDB 5.5.64 is installed and running.

ProFTPD is installed.

Logrotate is installed.

SpamAssassin and Procmail are installed and configured for use.

ClamAV is installed and assumed to be running.

Using network interface eth0 for virtual IPs.

Default IPv4 address for virtual servers is xxxxxx.

Both user and group quotas are enabled for home and email directories.

All commands needed to create and restore backups are installed.

The selected package management and update systems are installed OK.

Chroot jails are available on this system

… your system is ready for use by Virtualmin.

Updating all Webmin users with new settings…
… done

Re-loading Webmin …
… done

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.