1 (edited by phild 2023-12-28 16:23:39)

Topic: [Closed] Clarification for removal of php8.1

I located a message that is very close to what I would like to do I think.  The difference being in that I have both php 8.1 and php 8.2 installed on my system (Fedora 38) and now that I no longer need php8.1 I want to remove it.  (Php 8.2 was installed with the upgrade to Fedora 38, but some applications did not support php8.2 at the time of the upgrade so I installed php8.1 from the remi repository.)  I initially though if I disabled the php-frm module that would meet my requirement but php8.1 is still started after each reboot.  It seems that all my applications that require php are now using php8.1 (Even the ones that used to use 8.2)

The clarification I am seeking is on:
  "1/ disable any php stream enabled from my repo

   dnf module reset php

   or even remove "remi-release" package

   2/ sync installation with enabled repo

   dnf distro-sync"

Re the "dnf module reset php"  does that mean "dnf php81 reset php" and should I need it on the "or even remove "remi-release" package" would that be remove php81 package?

Appreciate if you can clarify so this old brain can geet my mind around what I need to do.

Re: [Closed] Clarification for removal of php8.1

Knowing what is installed may help, so:

rpm -qa php|* | sort

> php8.1 is still started after each reboot

Rather started on Apache start, expected (see /etc/systemd/system/httpd.service.d/php81-php-fpm.conf)

> Php 8.2 was installed with the upgrade to Fedora 38

So probably default version from official repo

> ... I have both php 8.1 and php 8.2 ...

So looks like SCL

A simple dnf remove php81\* will remove everything related to 8.1

> Re the "dnf module reset php"  does that mean "dnf php81 reset php"

The module doesn't seems to be used (system default version), so won't have any effects

>or even remove "remi-release" package" would that be remove php81 package?

No, repository configuration won't affect installed packages

Laptop:  Fedora 40 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: AlmaLinux 8 with EPEL, rpmfusion, remi

Re: [Closed] Clarification for removal of php8.1

> It seems that all my applications that require php are now using php8.1 (Even the ones that used to use 8.2)

When multiple versions are installed, you need to check SetHandler directives in /etc/httpd/conf.d

And yes the greater version installed by SCL will be used by default (last loaded configuration file)

BTW, removing "php81*" will remove its configuration file,
so another version will be used by default

Excepted if you have modified the configuration by hand

Laptop:  Fedora 40 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: AlmaLinux 8 with EPEL, rpmfusion, remi

Re: [Closed] Clarification for removal of php8.1

Thanks for the feedback.  Here is the output you reqested:

 [root@dbserve2 ~]# rpm -qa php* | sort
php81-php-cli-8.1.26-1.fc38.remi.x86_64
php81-php-common-8.1.26-1.fc38.remi.x86_64
php81-php-fpm-8.1.26-1.fc38.remi.x86_64
php81-php-gd-8.1.26-1.fc38.remi.x86_64
php81-php-gmp-8.1.26-1.fc38.remi.x86_64
php81-php-imap-8.1.26-1.fc38.remi.x86_64
php81-php-intl-8.1.26-1.fc38.remi.x86_64
php81-php-mbstring-8.1.26-1.fc38.remi.x86_64
php81-php-mysqlnd-8.1.26-1.fc38.remi.x86_64
php81-php-pdo-8.1.26-1.fc38.remi.x86_64
php81-php-pecl-apcu-5.1.23-1.fc38.remi.x86_64
php81-php-pecl-imagick-im7-3.7.0-7.fc38.remi.x86_64
php81-php-pecl-jsonpath-1.0.0-1.fc38.remi.x86_64
php81-php-pecl-json-post-1.1.0-1.fc38.remi.x86_64
php81-php-pecl-mcrypt-1.0.6-1.fc38.remi.x86_64
php81-php-pecl-memcache-8.2-1.fc38.remi.x86_64
php81-php-pecl-mysql-1.0.0-0.25.20210423.ca514c4.fc38.remi.x86_64
php81-php-pecl-mysql-xdevapi-8.0.30-1.fc38.remi.x86_64
php81-php-pecl-zip-1.22.3-1.fc38.remi.x86_64
php81-php-process-8.1.26-1.fc38.remi.x86_64
php81-php-smbclient-1.1.1-1.fc38.remi.x86_64
php81-php-xml-8.1.26-1.fc38.remi.x86_64
php81-runtime-8.1-4.fc38.remi.x86_64
php-8.2.13-1.fc38.x86_64
php-bacon-qr-code2-2.0.8-2.fc38.noarch
php-bcmath-8.2.13-1.fc38.x86_64
php-cli-8.2.13-1.fc38.x86_64
php-common-8.2.13-1.fc38.x86_64
php-composer-ca-bundle-1.3.7-1.fc38.remi.noarch
php-composer-metadata-minifier-1.0.0-5.fc38.noarch
php-composer-pcre-1.0.1-3.fc38.noarch
php-composer-semver3-3.4.0-1.fc38.remi.noarch
php-composer-spdx-licenses-1.5.8-1.fc38.remi.noarch
php-composer-xdebug-handler2-2.0.5-3.fc38.noarch
php-dasprid-enum-1.0.5-1.fc38.remi.noarch
php-dba-8.2.13-1.fc38.x86_64
php-fedora-autoloader-1.0.1-10.fc38.noarch
php-fpm-8.2.13-1.fc38.x86_64
php-gd-8.2.13-1.fc38.x86_64
php-gmp-8.2.13-1.fc38.x86_64
php-google-recaptcha-1.3.0-1.fc38.remi.noarch
php-intl-8.2.13-1.fc38.x86_64
php-jsonlint-1.10.0-1.fc38.remi.noarch
php-justinrainbow-json-schema5-5.2.13-1.fc38.remi.noarch
php-mbstring-8.2.13-1.fc38.x86_64
phpMyAdmin-5.2.1-1.fc38.noarch
php-mysqlnd-8.2.13-1.fc38.x86_64
php-nikic-fast-route-1.3.0-10.fc38.noarch
php-opcache-8.2.13-1.fc38.x86_64
php-paragonie-constant-time-encoding-2.6.3-3.fc38.noarch
php-paragonie-random-compat-2.0.18-9.fc38.noarch
php-pdo-8.2.13-1.fc38.x86_64
php-pear-1.10.14-1.fc38.remi.noarch
php-pecl-apcu-5.1.23-1.fc38.x86_64
php-pecl-imagick-3.7.0-6.fc38.x86_64
php-pecl-zip-1.21.1-2.fc38.x86_64
php-php-gettext-1.0.12-14.fc38.noarch
php-phpmyadmin-motranslator5-5.3.1-1.fc38.remi.noarch
php-phpmyadmin-shapefile-2.1-13.fc38.noarch
php-phpmyadmin-sql-parser5-5.8.2-1.fc38.remi.noarch
php-phpmyadmin-twig-i18n-extension-3.0.0-6.fc38.noarch
php-phpseclib-2.0.44-1.fc38.remi.noarch
php-pragmarx-google2fa5-5.0.0-9.fc38.noarch
php-pragmarx-google2fa-qrcode-1.0.3-8.fc38.noarch
php-process-8.2.13-1.fc38.x86_64
php-psr-cache-1.0.1-15.fc38.noarch
php-psr-container-1.1.2-4.fc38.noarch
php-psr-event-dispatcher-1.0.0-9.fc38.noarch
php-PsrLog-1.1.4-5.fc38.noarch
php-react-promise-2.9.0-3.fc38.noarch
php-samyoul-u2f-php-server-1.1.4-10.fc38.noarch
php-seld-phar-utils-1.2.1-2.fc38.noarch
php-sodium-8.2.13-1.fc38.x86_64
php-symfony4-cache-4.4.47-1.fc38.noarch
php-symfony4-common-4.4.47-1.fc38.noarch
php-symfony4-config-4.4.47-1.fc38.noarch
php-symfony4-console-4.4.47-1.fc38.noarch
php-symfony4-debug-4.4.47-1.fc38.noarch
php-symfony4-dependency-injection-4.4.47-1.fc38.noarch
php-symfony4-expression-language-4.4.47-1.fc38.noarch
php-symfony4-filesystem-4.4.47-1.fc38.noarch
php-symfony4-finder-4.4.47-1.fc38.noarch
php-symfony4-process-4.4.47-1.fc38.noarch
php-symfony4-var-exporter-4.4.47-1.fc38.noarch
php-symfony-contracts-1.1.13-3.fc38.noarch
php-symfony-polyfill-1.28.0-1.fc38.remi.noarch
php-tcpdf-6.6.5-1.fc38.remi.noarch
php-tcpdf-dejavu-sans-fonts-6.6.5-1.fc38.remi.noarch
php-tidy-8.2.13-1.fc38.x86_64
php-twig3-3.6.1-1.fc38.remi.noarch
php-williamdes-mariadb-mysql-kbs-1.2.14-2.fc38.noarch
php-xml-8.2.13-1.fc38.x86_64
[root@dbserve2 ~]# 

Re php8.2 - yes it is from the official repro and was installed prior to php8.1

And yes the greater version installed by SCL will be used by default (last loaded configuration file)

Ah! that explains why all the apps are utilizing php8.1 rather than 8.2.

Hopefully the above output provides any additional needed information.

Re: [Closed] Clarification for removal of php8.1

so, as said previously,  dnf remove 'php81*'
should fix your problem
(and restart Apache)

Laptop:  Fedora 40 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: AlmaLinux 8 with EPEL, rpmfusion, remi

Re: [Closed] Clarification for removal of php8.1

notice that some extensions installed for 8.1
are not installed for default version 8.2
(smclient, memcache...)

Laptop:  Fedora 40 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: AlmaLinux 8 with EPEL, rpmfusion, remi

Re: [Closed] Clarification for removal of php8.1

After all the holiday distractions, I finally got back to this.  There were some dependencies that are indicated to be deleted if I use the "dnf remove 'php81*'" command - see below:

dnf remove 'php81*'
Dependencies resolved.
================================================================================================================================================================================================================
 Package                                                   Architecture                        Version                                                               Repository                            Size
================================================================================================================================================================================================================
Removing:
 php81-php-cli                                             x86_64                              8.1.26-1.fc38.remi                                                    @remi                                 16 M
 php81-php-common                                          x86_64                              8.1.26-1.fc38.remi                                                    @remi                                8.1 M
 php81-php-fpm                                             x86_64                              8.1.26-1.fc38.remi                                                    @remi                                8.2 M
 php81-php-gd                                              x86_64                              8.1.26-1.fc38.remi                                                    @remi                                117 k
 php81-php-gmp                                             x86_64                              8.1.26-1.fc38.remi                                                    @remi                                 77 k
 php81-php-imap                                            x86_64                              8.1.26-1.fc38.remi                                                    @remi                                109 k
 php81-php-intl                                            x86_64                              8.1.26-1.fc38.remi                                                    @remi                                488 k
 php81-php-mbstring                                        x86_64                              8.1.26-1.fc38.remi                                                    @remi                                1.1 M
 php81-php-mysqlnd                                         x86_64                              8.1.26-1.fc38.remi                                                    @remi                                426 k
 php81-php-pdo                                             x86_64                              8.1.26-1.fc38.remi                                                    @remi                                230 k
 php81-php-pecl-apcu                                       x86_64                              5.1.23-1.fc38.remi                                                    @remi                                189 k
 php81-php-pecl-imagick-im7                                x86_64                              3.7.0-7.fc38.remi                                                     @remi                                586 k
 php81-php-pecl-json-post                                  x86_64                              1.1.0-1.fc38.remi                                                     @remi                                 29 k
 php81-php-pecl-jsonpath                                   x86_64                              1.0.0-1.fc38.remi                                                     @remi                                 93 k
 php81-php-pecl-mcrypt                                     x86_64                              1.0.6-1.fc38.remi                                                     @remi                                 63 k
 php81-php-pecl-memcache                                   x86_64                              8.2-1.fc38.remi                                                       @remi                                211 k
 php81-php-pecl-mysql                                      x86_64                              1.0.0-0.25.20210423.ca514c4.fc38.remi                                 @remi                                 80 k
 php81-php-pecl-mysql-xdevapi                              x86_64                              8.0.30-1.fc38.remi                                                    @remi                                2.3 M
 php81-php-pecl-zip                                        x86_64                              1.22.3-1.fc38.remi                                                    @remi                                170 k
 php81-php-process                                         x86_64                              8.1.26-1.fc38.remi                                                    @remi                                127 k
 php81-php-smbclient                                       x86_64                              1.1.1-1.fc38.remi                                                     @remi                                113 k
 php81-php-xml                                             x86_64                              8.1.26-1.fc38.remi                                                    @remi                                454 k
 php81-runtime                                             x86_64                              8.1-4.fc38.remi                                                       @remi                                 22 k
Removing unused dependencies:
 environment-modules                                       x86_64                              5.2.0-2.fc38                                                          @fedora                              2.8 M
 libc-client                                               x86_64                              2007f-31.fc38.remi                                                    @remi                                1.5 M
 libicu73                                                  x86_64                              73.2-1.fc38.remi                                                      @remi                                 36 M
 libmcrypt                                                 x86_64                              2.5.8-34.fc38                                                         @fedora                              285 k
 nagelfar                                                  noarch                              1.3.3-2.fc38                                                          @fedora                              693 k
 scl-utils                                                 x86_64                              1:2.0.2-21.fc38.remi                                                  @remi                                 66 k

Transaction Summary
================================================================================================================================================================================================================
Remove  29 Packages

I assume php8.2 does not used the three @fedora modules listed under the "Removing unused dependencies" but in the event that it does, is it just a matter of re-installing those modules from the Fedora 38 repositories?  Since they are listed as "unused" I assume they are good to go (just call me "Mother Hen" (g))

Re: [Closed] Clarification for removal of php8.1

Yes, these lib are removed because unused

(ex intl ext for php 8.1 in my repo use libicu73, while intl ext for php 8.2 in official repo use libicu version 72)

Laptop:  Fedora 40 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: AlmaLinux 8 with EPEL, rpmfusion, remi

Re: [Closed] Clarification for removal of php8.1

Thanks for the assistance and guidance - have successfully removed php8.1 and now the apps are using 8.2.  Again, appreciated your patience with my intimidation with doing this change.