IonCube is a PHP encoding tool used to protect PHP source code from unauthorized copying or usage. It works by encoding PHP source code into an unreadable format. To run the encoded source code, an IonCube decoder is required.
To install IonCube for PHP 8.1 and 8.2 on WordOps, follow these steps:
Step 1: Download the IonCube installation package
cd /usr/local
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xzf ioncube_loaders_lin_x86-64.tar.gz && rm -f ioncube_loaders_lin_x86-64.tar.gz
Step 2: Enter the necessary information into the configuration file
In this guide, I will configure for 2 PHP versions. Copy and run the corresponding commands as follows:
For PHP 8.1
echo 'zend_extension = "/usr/local/ioncube/ioncube_loader_lin_8.1.so"' | sudo tee -a /etc/php/8.1/cli/php.ini
echo 'zend_extension = "/usr/local/ioncube/ioncube_loader_lin_8.1.so"' | sudo tee -a /etc/php/8.1/fpm/php.ini
For PHP 8.2
echo 'zend_extension = "/usr/local/ioncube/ioncube_loader_lin_8.2.so"' | sudo tee -a /etc/php/8.2/cli/php.ini
echo 'zend_extension = "/usr/local/ioncube/ioncube_loader_lin_8.1.so"' | sudo tee -a /etc/php/8.2/fpm/php.ini
Step 3: Reload WordOps and check
wo stack reload
Then you can check with the command php -v
Or use the command php -m | grep ionCube
If IonCube has been successfully installed and activated, the PHP source code encoded with IonCube should be able to run on the web server.