How to install ionCube Loader on Hestia CP

2 October, 2023

Interfering with the server's file system carries the risk of damage, which can lead to the malfunctioning of both individual small parts and the entire system. Therefore, the user must perform a preliminary [server snapshot] before starting any work. 

The relevance of the algorithm of actions provided below is maintained in relation to Hestia. For other control panels, the information may not be useful. The owner of the server should remember that operations are performed at their own risk. Once all the "pros" and "cons" are weighed, one can begin to act:

  1. Connect to the server using the SSH terminal.
  2. Execute the command cd /home; wget downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.zip; unzip ioncube_loaders_lin_x86-64.zip; cd ioncube/; ls -lh. This command automatically navigates to the home directory, downloads the archive containing the extension files, unzips them, and lists the files. The extension is installed separately for each of the PHP versions present on the server. 
  3. Enter the command php7.4 -i | grep “PHP Extension”. This will provide information on where the extension file will be loaded. The user needs to pay attention to the numbers. Before executing the command, they must be replaced with the user's own PHP version for which the extension will be installed.
  4. Copy the extension file to the directory of other extensions — cp ioncube_loader_lin_7.4.so /usr/lib/php/20190902.
  5. Create a file 00-ioncube.ini specifying the required PHP version in the configuration directory — echo zend_extension=ioncube_loader_lin_7.4.so > /etc/php/7.4/fpm/conf.d/00-ioncube.ini.
  6. For the extension to work in the console version of PHP, the file needs to be placed in the CLI directory using the command echo zend_extension=ioncube_loader_lin_7.4.so > /etc/php/7.4/cli/conf.d/00-ioncube.ini. 
  7. Restart the PHP service of the required version — service php7.4-fpm restart

 To check the activation of the module, the phpinfo script or the php7.4 -v command is used.