PHP Version doesn't get updated in php-fcgi after do-release-upgrade

PHP Version(7.2 -> 7.4) doesn't get updated in php-fcgi after do-release-upgrade 18.04 -> 20.04 perhaps this should be included in virtual server config checks?

This also seems to be related to the issue here, it seems these files do not get picked up by config checking or verification, see my comment, https://www.virtualmin.com/comment/830669#comment-830669

#!/bin/sh
### BEGIN INIT INFO
# Provides: php-fcgi-chefelite-vanguardit-services
# Required-Start: $network $syslog
# Required-Stop: $network
# Default-Start: 2 3 5
# Default-Stop:
# Description: Start Nginx PHP fcgi server for chefelite.vanguardit.services
### END INIT INFO

case "$1" in
'start')
        su vanguardit -c PHPRC\=\/home\/vanguardit\/domains\/chefelite\.vanguardit\.services\/etc\/php7\.2\ PHP_FCGI_CHILDREN\=4\ \/usr\/bin\/php\-loop\.pl\ \/usr\/bin\/php\-cgi7\.2\ \-b\ \/var\/php\-nginx\/15919031144769\.sock\/socket\ \>\>\/home\/vanguardit\/domains\/chefelite\.vanguardit\.services\/logs\/php\.log\ 2\>\&1\ \<\/dev\/null\ \&\ echo\ \$\!\ \>\/var\/php\-nginx\/15919031144769\.php\.pid
        RETVAL=$?
        ;;
'stop')
        su vanguardit -c kill\ \`cat\ \/var\/php\-nginx\/15919031144769\.php\.pid\` ; sleep 1
        RETVAL=$?
        ;;
'restart')
        $0 stop ; $0 start
        RETVAL=$?
        ;;
*)
        echo "Usage: $0 { start | stop }"
        RETVAL=1
        ;;
esac
exit $RETVAL
Status: 
Active
Virtualmin version: 
6.14
Webmin version: 
1.962

Comments

Ilia's picture
Submitted by Ilia on Sat, 12/05/2020 - 05:30

We recently fixed multiple issues with Virtualmin Nginx module and released version 2.18, which should be available right now. Give it a try.

By the way, we no longer use init.d init script for FastCGI Nginx and generate systemd script instead.

PHP Version(7.2 -> 7.4) doesn't get updated in php-fcgi after do-release-upgrade 18.04 -> 20.04 perhaps this should be included in virtual server config checks?

It's doable, I assume but distro upgrades require some work anyway. The simplest solution for this issue is to toggle execution mode from Server Configuration > Website Options page or change PHP version used from Server Configuration > PHP Versions page.

You could use Virtualmin CLI script to do it in bulk for all virtual servers.

That Server config -> website options execution mode is a temp fix like I mentioned in the issue on the archived forum. It works until reboot. The Server Config -> PHP Versions page didn't detect that PHP7.2 was installed because it wasn't, it was uninstalled with 20.04 and only remnants were leftover. It just said only one version of PHP is installed and nothing else hinting at the real issue.

Also, could you explain how I switch from the init.d entries to systemd services? I change the init entries and it works so I assume I must be using the old system? Also how can I tell the version of the Nginx module I'm on?

I think it may be worth it to include in the config check, especially with the influx of people who are going to be switching from 18.04 LTS to 20.04 LTS. I may make a guide, but the only things that required manual intervention was installing dovecot-imapd,dovecot-pop3d, changing mailbox location to detect automatically, install and enable saslauthd, and fix the aforementioned PHP issues.

Thank you a ton, William

Ilia's picture
Submitted by Ilia on Wed, 12/09/2020 - 04:17

Assigned: Unassigned ยป

Hi, William!

could you explain how I switch from the init.d entries to systemd services?

You could achieve that by changing PHP version used (if multiple are installed) or toggling PHP execution mode on Server Configuration > Website options or disabling/enabling website feature on Edit Virtual Server page (resets virtualhost (server) records to defaults).

how can I tell the version of the Nginx module I'm on?

By going to System Settings > Features and Plugins page. Latest should be delivered by using standard package manager upgrade. The latest at the moment is version 2.18.

I think it may be worth it to include in the config check, especially with the influx of people who are going to be switching from 18.04 LTS to 20.04 LTS.

Jamie, what do you think, should config check make sure that PHP version found on domain config file is actually available, and if it's not, change virtual server records, and fall back to the one defined on the default template?