Skip to Content

Upgrade PHP from 7.x to 8.x in RHEL8

How to upgrade PHP from 7.x to 8.x in RHEL8?

1. Take the backup of Ezeelogin before upgrading PHP 

root@gateway:~# /usr/local/sbin/backup_ezlogin.php 

2. Run the below commands in the Rhel8 server

root@gateway:~# dnf install -y

root@gateway:~# dnf install -y 

3. Install the PHP 8.1 repository

root@gateway:~# dnf module reset php -y

root@gateway:~# dnf module install php:remi-8.1 -y

4. Install yum-util packages

root@gateway:~# yum install yum-utils -y

5. Then run the update command

root@gateway:~# yum update

6. After upgrading php , download the ioncube for the latest PHP version 

root@gateway:~# wget

root@gateway:~# tar -zxf ioncube_loaders_lin_x86-64.tar.gz && mv ioncube /usr/local

7. Edit the php configuration file & Add corresponding ioncube loader

root@gateway:~# vi /etc/php.ini

zend_extension = /usr/local/ioncube/

root@gateway:~# service httpd restart

root@gateway:~# service php-fpm restart

8. Ensure that ioncube decoders are loaded by viewing the php configuration page.

vi /var/www/html/phpinfo.php




9. Open the phpinfo page and it would show the ioncube version that has been loaded. As you can see ionCube version 12.0.5 has been loaded.

10. After upgrading PHP to 8.1 download the latest Ezeelogin package for PHP 8.1

root@gateway:~#  wget

11. Run the below command to upgrade Ezeelogin using a single command. Replace the Ezeelogin package name, database root username, and password.

root@gateway:~#  sh ezlogin_7.32.0_php81.bin -- -dbsuser <enter (root)db username> -dbspass <enter_(root)db_password> -skipgeolite -auto -force -ACCEPT_SETTINGS -I_ACCEPT_EULA -skipbackup -update


Related Articles