Keeping your server components up to date is essential for maintaining security, performance, and compatibility with modern applications. One such critical component for PHP applications is the IonCube Loader. IonCube Loader is widely used to decode and execute encrypted PHP files, and knowing how to upgrade IonCube Loader on RHEL is critical to keeping it updated to the latest version, ensuring your server runs smoothly and efficiently.
If you’re running an RHEL server with PHP 8.3 (or any version higher than PHP 7.4) and using the Plesk control panel, and you’re looking for how to upgrade IonCube Loader on RHEL, this guide will take you through the entire update process step by step.
Why Update IonCube Loader?
- Security: Updated versions of IonCube Loader address security vulnerabilities, keeping your server safe from exploits.
- Performance: The latest IonCube versions improve performance when handling encrypted files.
- Compatibility: Newer versions of PHP (such as PHP 8.3) often require the latest version of IonCube Loader to function correctly.
Step 1: Connect to the server via SSH with root access or sudo privileges
Step 2: Download the latest version of IonCube Loader by
#cd /root/
#wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
#tar -xvf ioncube_loaders_lin_x86-64.tar.gz
After downloading, you’ll see a directory ioncube/ in which you’ll see the ioncube_loader files for corresponding PHP versions.
Step 3: Backup the old ioncube loader .so file, (if there exists one)
#cd /opt/plesk/php/8.x/lib64/php/modules/
#mv ioncube_loader_lin_8.x.so ioncube_loader_lin_8.x.so_back
Now copy the file from the ioncube/ directory to the corresponding PHP modules directory:
#cp -a ioncube/ioncube_loader_lin_8.x.so /opt/plesk/php/8.x/lib64/php/modules/ioncube_loader_lin_8.x.so
Replace ‘x’ with your corresponding version of PHP.
Step 4: Set permissions if required
#chown root:root /opt/plesk/php/8.x/lib64/php/modules/ioncube_loader_lin_8.x.so && chmod 644 /opt/plesk/php/8.x/lib64/php/modules/ioncube_loader_lin_8.x.so
Replace ‘x’ with your corresponding version of PHP.
Step 5: Open the php.ini file with a text editor
#vim /opt/plesk/php/8.x/etc/php.ini
Add the following line to the file to load the IonCube loader:
zend_extension = /usr/local/ioncube/ioncube_loader_lin_8.x.so
Replace ‘x’ with your corresponding version of PHP.
You can do this via ssh or via Plesk control panel. In Plesk goto Tools&Settings >> PHP settings >> Select ‘alt-php8.x-fastcgi FastCGI application’ >> edit php.ini >> click ‘ok’.
Step 6: Restart Apache Web Server in order to apply the change
#systemctl restart httpd
Step 7: Check if the ioncube loader is updated for the desired PHP version by
# /opt/plesk/php/8.x/bin/php -v | grep -i ioncube
You can also use the PHP info page for checking the loader version.
Conclusion
IonCube Loader is a tool used to securely run encrypted PHP files, providing protection for proprietary PHP code while ensuring efficient performance on web servers. By knowing how to upgrade IonCube Loader on RHEL, your server can securely handle encoded PHP files while keeping your environment up to date with the latest technology. By following the steps outlined above, you’ve taken the necessary precautions to maintain both performance and security on your server.
If you’re unsure how to upgrade IonCube Loader to the latest version on an RHEL server shipped by Plesk or need expert help with Plesk Server Management Services, our team at Skynats is here to assist. We provide professional support for how to enable IonCube on a Plesk RHEL server, ensuring your server runs smoothly and securely. Contact us today for hassle-free server management!