Installing ionCube + PHP-FPM on CentOS 7 and RHEL 7
To install ionCube with PHP on CentOS 7 and RHEL 7, follow these steps:
Download the ionCube Loader from the official ionCube website (https://www.ioncube.com/loaders.php) according to the version of PHP you are using. For example, for PHP 7.4 on CentOS 7, you can download the following file:
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
Extract the downloaded file:
tar xvfz ioncube_loaders_lin_x86-64.tar.gz
Copy the ioncube_loader_lin_7.4.so file to the directory where your PHP extension library is stored. For example, if you are using PHP-FPM, you can copy the file to the /usr/pre/php/modules directory:
sudo cp ioncube/ioncube_loader_lin_7.4.so /usr/lib64/php/modules/
Create an ionCube configuration file for PHP. Create a new ioncube.ini file in the /etc/php.d/ directory with the following content:
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_7.4.so
Restart your web server or PHP-FPM to apply the changes:
sudo systemctl restart httpd
or
sudo systemctl restart php-fpm
Verify that ionCube is installed. Create a phpinfo.php file in the root directory of your web server with the following content:
echo phpinfo();
Open this file in your web browser and make sure that ionCube is installed. There should be a section in "Additional Modules" with the name "ionCube Loader".