CentOS 7.9 Core PHP 7.2 to 7.4 Upgrade

We are currently running on PHP version 7.2 I’m trying to get us upgraded to release 7.4, and I’m running into the following error when I validate PHP.

Steps…

yum update -y
yum install epel-release
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum list installed php*
yum remove php*
yum install --enablerepo=remi-php72 php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo

php -v

PHP 7.4.12 (cli) (built: Oct 27 2020 15:01:52) ( NTS )
Copyright © The PHP Group
Zend Engine v3.4.0, Copyright © Zend Technologies

-bash-4.2$ ./validate.php

In AppServiceProvider.php line 43:

Call to undefined method Illuminate\Pagination\Paginator::useBootstrap()

PHP Fatal error: Uncaught ErrorException: Undefined index: openssl_ver in /opt/librenms/validate.php:166
Stack trace:
#0 /opt/librenms/validate.php(166): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /opt/librenms/validate.php(83): print_header()
#2 [internal function]: {closure}()
#3 {main}

thrown in /opt/librenms/validate.php on line 166

Whty are you enabling 7.2?

Sorry that was a mistake on my part, copied incorrectly.

yum install --enablerepo=remi-php74 php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-

you need to remove 7.2

grep for 7.2 and remove all the packages

rpm -qa | grep PHP

and then yum install all of the 7.4 PHP packages

1 Like