Re-check configuration not working after trying to remove php80

I needed to get php and php-fpm on 8.2 by default, and researching the formum for removing an old php, was confusing.

I ran:

dnf remove php80-php-{cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,curl,xml,zip}

dnf remove php82-php-{cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,curl,xml,zip}
dnf install php82-php-{cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,curl,xml,zip}

dnf module switch-to php:remi-8.2

I verified that I only have php82 installed, and removed and installed it again, to make sure the links were good.

I looked into these folders:

/etc/httpd/conf.d
/etc/opt/remi
/etc/systemd/system
/usr/lib/systemd/system

Only php-82 is installed.

I can run virtualmin check-config from the command line, but when I click on re-check configuration from the web page, it pulls up the last results very quit, as if it did not run it, showing php80-fpm.

Also the the Server Status reset for php-fpm is updated, shows 8.0, which I still see signs of in some screens, so I am not sure it is gone, or how to get rid of it.

I reran the install wizard.

virtualmin check-config

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

BIND DNS server is installed
Mail server Postfix is installed and configured
Postfix is configured to support per-domain outgoing IP addresses
Apache is installed
Apache supports HTTP/2 on your system
The following CGI script execution modes are available : fcgiwrap
The following PHP execution modes are available : fpm cgi

The following PHP versions are available : 8.2.25 (/bin/php82-cgi)
The following PHP-FPM versions are available : 8.2.25 (php-fpm)

Apache is configured to host SSL websites
MariaDB 10.5.22 is installed and running
Logrotate is installed
SpamAssassin and Procmail are installed and configured for use
ClamAV is installed and assumed to be running
The System and Server Status module is installed and checking on schedule
Plugin AWStats reporting is installed
Plugin Protected web directories is installed
Using network interface eth0 for virtual IPs
IPv6 addresses are available, using interface eth0
Default IPv4 address for virtual servers is <Redacted>
Default IPv6 address for virtual servers is <Redacted>
Detected external IPv4 address is <Redacted>
Both user and group quotas are enabled for home and email directories
All commands needed to create and restore backups are installed
Resource limits are supported and configured correctly
The selected package management and update systems are installed
Chroot jails are available
The Virtualmin repository is configured correctly
OK

The following is empty.

grep -R '/etc/opt/remi/php80' /etc/webmin/virtual-server

And

ls /etc/opt/remi/
php82

System Information

OS type and version    AlmaLinux 9.5
Webmin version         2.202
Virtualmin version     7.20.2 Pro         
  1. How can I ensure php80 is removed?
  2. How can I fix re-check configuration on web page?
  3. How can I fix the restart service for php-fpm on web page?

These all work form terminal.

Thanks for any help.

@jflesher,

Try on the command line:

This will show you which versions of PHP Virtualmin currently sees as installed.

Assuming PHP 8.2 “is” available on that list (as your own output would suggest)…

Run the command:

This will upgrade all websites to use PHP 8.2.

*** Virtualmin GUI uses the same commands as the CLI API ***

Version         Path
--------------- ------------------------------------------------------------
8.2             /bin/php82-cgi

Thanks for the command virtualmin modify-web --all-domains --mode fpm --php-version 8.2, I rebooted, and the same thing.

New install of NextCloud, required some tweeking, as it wanted apc or apcu, which seems to working fine, I only need to change one setting in /etc/opt/remi/php82/php.d/40-apcu.ini, to set apc.enable_cli=1.

I have been at this all day since the Alma Upgrade to 9.5, when I noticed the default php was php80, and NextCloud required php82, so my cron was failing, which broke the web interface, as the command line works fine.

I can restart the php-fpm, but not the php82.fpm.

I have been looking at the bash history to find anything I needed to undo, or fix, but so far it all looks good.

I have been working on Unix or Linux servers since the 80s, but I am new to Alma, but not CentOS. I have been using Webmin around 1999, but switched to Virtualmin in 2004, and I have had my fair share of messing things up, but I am a programer, and not a server admin. I was hoping I could fix this, as it does not seem that difficult, but I did something to break the way the interface works, while trying to get rid of php74 and php80. 74 was not an issue, and I did it the same way. Once I removed it, it stopped showing up, but I did have to manually delete it the folder in opt, but there was no php80 folder, only php82.

I hope I gave enough details.

Thanks.

Even if php80 was install, if you have Nexcloud install on a virtual server with php82 set on that virtual server it will run fine, I have 3 versions install 74 81 and 82 and works fine.

clicking the hightlighted will show phpinfo for the virtual server.

You can set a default in your template

I changed all the domains by hand, but the command you gave me did the same thing, it is set to 8.2.

The default is set to highest, but 8.0 is an option, and one of the screens that make me think it is not all the way gone, but changing it to 8.2 does not change it.

Enabled repo

dnf module list php
Last metadata expiration check: 0:23:06 ago on Tue 19 Nov 2024 02:00:38 AM CST.
AlmaLinux 9 - AppStream
Name                                        Stream                                              Profiles                                                          Summary
php                                         8.1                                                 common [d], devel, minimal                                        PHP scripting language
php                                         8.2                                                 common [d], devel, minimal                                        PHP scripting language

Remi's Modular repository for Enterprise Linux 9 - x86_64
Name                                        Stream                                              Profiles                                                          Summary
php                                         remi-7.4                                            common [d], devel, minimal                                        PHP scripting language
php                                         remi-8.0                                            common [d], devel, minimal                                        PHP scripting language
php                                         remi-8.1                                            common [d], devel, minimal                                        PHP scripting language
php                                         remi-8.2 [e]                                        common [d], devel, minimal                                        PHP scripting language
php                                         remi-8.3                                            common [d], devel, minimal                                        PHP scripting language
php                                         remi-8.4                                            common [d], devel, minimal                                        PHP scripting language

Installed php

 dnf list installed | grep php
gd3php.x86_64                               2.3.3-9.el9.remi                   @remi-safe
oniguruma5php.x86_64                        6.9.9-2.el9.remi                   @remi-safe
php-bcmath.x86_64                           8.2.25-1.el9.remi                  @remi-modular
php-cli.x86_64                              8.2.25-1.el9.remi                  @remi-modular
php-common.x86_64                           8.2.25-1.el9.remi                  @remi-modular
php-devel.x86_64                            8.2.25-1.el9.remi                  @remi-modular
php-fedora-autoloader.noarch                1.0.1-7.el9                        @epel
php-fpm.x86_64                              8.2.25-1.el9.remi                  @remi-modular
php-gd.x86_64                               8.2.25-1.el9.remi                  @remi-modular
php-gmp.x86_64                              8.2.25-1.el9.remi                  @remi-modular
php-intl.x86_64                             8.2.25-1.el9.remi                  @remi-modular
php-mbstring.x86_64                         8.2.25-1.el9.remi                  @remi-modular
php-mysqlnd.x86_64                          8.2.25-1.el9.remi                  @remi-modular
php-nikic-php-parser4.noarch                4.18.0-1.el9                       @epel
php-opcache.x86_64                          8.2.25-1.el9.remi                  @remi-modular
php-pdo.x86_64                              8.2.25-1.el9.remi                  @remi-modular
php-pear.noarch                             1:1.10.14-1.el9                    @appstream
php-pecl-apcu.x86_64                        5.1.24-1.el9.remi.8.2              @remi-modular
php-pecl-igbinary.x86_64                    3.2.16-1.el9.remi.8.2              @remi-modular
php-pecl-imagick-im6.x86_64                 3.7.0-7.el9.remi.8.2               @remi-modular
php-pecl-memcache.x86_64                    8.2-1.el9.remi.8.2                 @remi-modular
php-pecl-memcached.x86_64                   3.3.0-1.el9.remi.8.2               @remi-modular
php-pecl-msgpack.x86_64                     3.0.0-1.el9.remi.8.2               @remi-modular
php-pecl-ssh2.x86_64                        1.4.1-1.el9.remi.8.2               @remi-modular
php-process.x86_64                          8.2.25-1.el9.remi                  @remi-modular
php-sodium.x86_64                           8.2.25-1.el9.remi                  @remi-modular
php-xml.x86_64                              8.2.25-1.el9.remi                  @remi-modular
php82-php-bcmath.x86_64                     8.2.25-1.el9.remi                  @remi-safe
php82-php-cli.x86_64                        8.2.25-1.el9.remi                  @remi-safe
php82-php-common.x86_64                     8.2.25-1.el9.remi                  @remi-safe
php82-php-devel.x86_64                      8.2.25-1.el9.remi                  @remi-safe
php82-php-fpm.x86_64                        8.2.25-1.el9.remi                  @remi-safe
php82-php-gd.x86_64                         8.2.25-1.el9.remi                  @remi-safe
php82-php-gmp.x86_64                        8.2.25-1.el9.remi                  @remi-safe
php82-php-imap.x86_64                       8.2.25-1.el9.remi                  @remi-safe
php82-php-intl.x86_64                       8.2.25-1.el9.remi                  @remi-safe
php82-php-mbstring.x86_64                   8.2.25-1.el9.remi                  @remi-safe
php82-php-mysqlnd.x86_64                    8.2.25-1.el9.remi                  @remi-safe
php82-php-opcache.x86_64                    8.2.25-1.el9.remi                  @remi-safe
php82-php-pdo.x86_64                        8.2.25-1.el9.remi                  @remi-safe
php82-php-pecl-apcu.x86_64                  5.1.24-1.el9.remi                  @remi-safe
php82-php-pecl-igbinary.x86_64              3.2.16-1.el9.remi                  @remi-safe
php82-php-pecl-imagick-im7.x86_64           3.7.0-7.el9.remi                   @remi-safe
php82-php-pecl-memcached.x86_64             3.3.0-1.el9.remi                   @remi-safe
php82-php-pecl-msgpack.x86_64               3.0.0-1.el9.remi                   @remi-safe
php82-php-pecl-redis6.x86_64                6.1.0-1.el9.remi                   @remi-safe
php82-php-pecl-zip.x86_64                   1.22.4-1.el9.remi                  @remi-safe
php82-php-sodium.x86_64                     8.2.25-1.el9.remi                  @remi-safe
php82-php-xml.x86_64                        8.2.25-1.el9.remi                  @remi-safe
php82-runtime.x86_64                        8.2-5.el9.remi                     @remi-safe
wbm-php-pear.noarch                         2:1.6-1                            @virtualmin-noarch

The fix is simple, I just do not know what it is, I need a command fixit.

I wish I installed something other than Alma now, I do not know what the best is, because Alma has an older SQL database, 10.5. I have a lot of sites, so this is not something I want to do, as Alma will eventually get 11, so I need to fix this.

Update: Got up today and it worked fine. Running that command was the only thing that changed, but it did not work last night, so gremlins or cron issues, will look into logs.

Thanks.

That’s a repo list not whats installed. I can’t see 80 anywhere otherwise.
Bit confused so your still seeing 80 in the drop down?

The database version on my Rocky 9.5 is MariaDB version 10.5.22
I would stick with what the OS uses.

@jflesher,

Since you’re using the “Remi Repo” for your newer version of PHP, you might take a look over at their site for some extra insights.

https://rpms.remirepo.net/

Removing the system-provided PHP version is not recommended. Just leave it, and follow our documentation for installing and choosing an alternative newer version.

I started off on this page, and my problem was it was set to highest, and setting to a value other than that, would not take or save from what I saw, at least it does not see the combo box with the value saved.

I had php74, php80, and then php82. I delete php74 by changing install to remove, and worked other than I had to delete the folder in opt.

I have cron jobs for NextCloud that run from php82, not php80, which is not the highest, yet it refused to run because the default php was php80, and I did verify that in a terminal, and with runnng php -v.

I tried everything I could find by googling, and I did find more than a few, but just more confusion about how to remove the old versions, and which not to remove, maybe you can add a section to the page you linked, as that is the one I used, and should be used.

The issue with the page not working, might have been cron, as I was testing out issues with it at the time, but the page never did come back, I cleared the cache, closed the browser, and still the same thing, but after a reboot, it stared working again. Firefox latest in Windows, and Edge, although I did not clear the cache, as it did not help Firefox.

The command line did work, and was never an issue, nor was the way the sites ran, other that it was always running the wrong default version of php.

You will have to test this on Alma 9.5, this is the pro version, so I used the NextCloud install script, as I did not notice this before I install this.

This is the only cron job that runs from php as far as I could find, so it might be the reason this error came up.

I delete php80 as another person said it fixed the issue, not this post, forgot the link, so maybe I should not have taken that advise, so it would be nice to write more about this subject, to avoid bad decisions. After doing so, the nightmare begin, and I am sure that is the reason this is a bad idea.

Instead of showing two versions of php, it only shows php82, and everything seems to work, other than my cron job, set for 5 minutes, but did not seem to run on time, but that might be have been there was nothing to do, but that is was what led me to all this madness.

I now only see 8.25 but did see 8.0 after removing it, but running the solved command, it cleared that.

Currently this works, not sure what else I can do to make it better.

What you need to write up is how to use the system-provided PHP, which if it is php80, how do I change the default to php82, without removed php80, and not php, that is not what I did, only the php version that I installed, which at the time php74 was the default. php -v is PHP 8.2.25, but I only used the code from the link you provided, so it has the php80-php before it, so it should not change the version of the php installed by the distro Alma.

I am going to change the OS back to Ubuntu to get a newer version of SQL, and that will fix this issue.

I hope to one day find a section that better describes how to maintain only the latest or specified php versions, and I am obvious not the one to write, as this was a hack fix, but I do think this is because I did not do it right, as you pointed out, bad idea, my nightmare.

Thanks.

you will need to edit the cron and change php to php82 should fix that.

try php82 -v

1 Like

Now both php-v and php82 -v are the same, php82.

cron is working now.

Whatever I did fixed this issue, although I know I did not do this switch from 7.4, to 8.0, to 8.2 the right way, becasue I delete 7 because it was then the default, and saving that never took, it seemed to always stay at the highest, which is not working for me, and I did not know a way around that issue.

Thanks

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