To start, you must decide if you want IonCube installed for your cPanel/WHM scripts or for your Apache/PHP scripts. It is pretty easy to find out if you require IonCube; the main use of IonCube is to access scripts from inside the /cPanel, /whm, or /webmail interface. If you require this, then you have to get IonCube.
install Ioncube loader on cPanel servers
Installing IonCube for cPanel/WHM/Webmail
We have laid out both the GUI and the CLI methods below.
Installing via the WHM
To follow the steps below, you are required to have administrative privileges, usually the root password.
Step 1: Begin by logging into WHM. This can be done by going to your servers’ IP followed by ‘/whm’ or ‘:2087’. For example: ‘http://127.0.0.1:2087/‘
Step 2: Once viewing your servers’ IP, you will see a Tweak settings link on the left side, click on this.
Step 3: Now, click on the PHP tab on the right-hand side.
Step 4: Look for the configurable option called ‘cPanel PHP loader’ and check the ‘ioncube’ checkbox.
Step 5: Lastly, click on ‘Save’.
Installing via the CLI
To follow the steps below, you will need to have shell access to the server as the user root.
Step 1: Start by logging into the shell as the user root.
Step 2: Modify ‘/etc/cpanel/cpanel.config’ and look for the line starting with ‘phploader=‘.
If there is no value after the equal sign then all you have to do is add ‘ioncube’ to it. For example: ‘phploader=ioncube’.
If there is another loader in place, just append your new loader by placing a comma before the additional loader. For example: ‘phploader=exampleloader,ioncube’.
Step 3: Now, run the command: ‘/usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettings’
Step 4: Afterwards, execute this following command: ‘/usr/local/cpanel/bin/checkphpini’
Step 5: And lastly, this command: ‘/usr/local/cpanel/bin/install_php_inis’
Installing IonCube Loader for Apache/PHP
You have several ways to do this, they will all be listed below.
Installing IonCube using the CLI version of PHPExtensionManager
The following method is the one we recommend. It allows you to install the loaders without the need to rebuild Apache and PHP; this also makes it the quickest method.
In this method, you will need shell access to the server as the user root via either the console, SSH, or any other means.
Step 1: Begin by logging into the console as root.
Step 2: Then, execute the following command: ‘/scripts/phpextensionmgr install IonCubeLoader’
That is it. Simple and fast.
Installing IonCube using the WHM
In the next method, we will use the GUI version of easyapache to install the ioncube loader.
If you are not interested in rebuilding Apache and PHP then do not use this method.
Step 1: Start by logging into the WHM as the user root.
Step 2: Once you are at the WHM interface, scroll down and the click on the ‘EasyApache’ link on the left-hand side.
Step 3: Below ‘Profile’, choose ‘Previous Saved Config’ and click on the ‘Start customizing based on profile’ button.
Step 4: Below ‘Apache Version’, find and click on ‘Next Step’
Step 5: Now, below ‘PHP version’ again find and click on ‘Next Step’
Step 6: Below the ‘Short Options list’, check the ‘ioncube Loader for PHP’ option and then click ‘Save and Build’.
Step 7: This procedure may take a little while to finish; usually between 10-30 minutes depending on your hardware.
Do let us know if you want to add any specific Linux or Web panels topics into this tutorial series.