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 https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
root@gateway:~# dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -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 https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
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/ioncube_loader_lin_8.1.so
root@gateway:~# service httpd restartroot@gateway:~# 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
root@gateway:~# 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.
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
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