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 

[email protected]:~# /usr/local/sbin/backup_ezlogin.php 

2. Run the below commands in the Rhel8 server

[email protected]:~# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y

[email protected]:~# dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -y 

3. Install the PHP 8.1 repository

[email protected]:~# dnf module reset php -y

[email protected]:~# dnf module install php:remi-8.1 -y

4. Install yum-util packages

[email protected]:~# yum install yum-utils -y

5. Then run the update command

[email protected]:~# yum update

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

[email protected]:~# wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

[email protected]:~# tar -zxf ioncube_loaders_lin_x86-64.tar.gz && mv ioncube /usr/local

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

[email protected]:~# vi /etc/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_8.1.so

[email protected]:~# service httpd restart

r[email protected]:~# service php-fpm restart

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

vi /var/www/html/phpinfo.php

<?php

phpinfo();

?>

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

[email protected]:~#  wget https://downloads.ezeelogin.com/ezlogin_7.32.0_php81.bin

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

[email protected]:~#  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

https://www.ezeelogin.com/kb/article/how-to-upgrade-php-to-8-1-in-debian-597.html

https://www.ezeelogin.com/kb/article/how-to-upgrade-php-to-7-4-on-centos-7-393.html

https://www.ezeelogin.com/kb/article/how-to-upgrade-php-to-7-2-on-centos-282.html

https://www.ezeelogin.com/kb/article/how-to-upgrade-php-to-8-1-in-ubuntu-562.html

https://www.ezeelogin.com/kb/article/how-can-we-upgrade-php-in-an-ezeelogin-installed-server-248.html