Install ioncube Print

  • 249

How to install Ioncube loader on cPanel servers

First thing you need to do is figure out if you need IonCube installed for your cPanel/WHM scripts or for your Apache/PHP scripts. Figuring this out is simple, if you need IonCube to use a script on your website then you need to install IonCube for your Apache/PHP installation. If you need IonCube to access scripts from within the /cpanel, /whm, or /webmail interface then you need to install IonCube for cPanel/WHM/Webmail. Instructions for doing both are below.

Installing IonCube for cPanel/WHM/Webmail

Both the GUI and CLI methods are listed below

Installing via the WHM

In order to do this you must have administrative privileges, normally the root password.

  1. Log into the WHM by going to your servers IP followed by /whm or :2087 (ex: http://127.0.0.1:2087/)
  2. On the left hand side click the 'Tweak Settings' link
  3. Click the PHP tab on the right hand side
  4. Find the configurable option labeled 'cPanel PHP loader' and check the ioncube checkbox
  5. Click Save

Installing via the CLI

In order complete this task you must have shell access to the server as the user root

  1. Log into the shell as the user root
  2. Edit /etc/cpanel/cpanel.config and find the line that starts with phploader=. If there is no value after the equal sign then you can simply append ioncube to it (ex: phploader=ioncube). If there is another loader already in place you can add your new loader by adding a comma first and then adding your loader (ex: phploader=someloader,ioncube)
  3. Next execute the following command, /usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettings
  4. And then /usr/local/cpanel/bin/checkphpini
  5. and finally /usr/local/cpanel/bin/install_php_inis

Installing IonCube Loader for Apache/PHP

There are multiple ways to do this, All have been listed below

Installing IonCube using the CLI version of PHPExtensionManager

This is the preferred method, all it does is install the loaders and does not require you to rebuild Apache and PHP. It's also the fastest method because of this. This method requires you to have shell access to the server as the user root via either the console, SSH, or some other means.

  1. Log into the console as root
  2. Run /scripts/phpextensionmgr install IonCubeLoader

That's it! That was pretty simple, eh?!

Installing IonCube using the WHM

This method uses the GUI version of easyapache to install the ioncube loader, if you do not want to rebuild Apache and PHP then dont use this method.

  1. Log into the WHM as the user root.
  2. On the left hand side scroll down and click the EasyApache link
  3. Under 'Profile', select 'Previous Saved Config' and click the 'Start customizing based on profile' button.
  4. Under 'Apache Version' click 'Next Step'
  5. Under 'PHP Version' click 'Next Step'
  6. Under 'Short Options List' check the 'Ioncube Loader for PHP' option and click the 'Save and Build' button.
  7. This process will take a while to complete, roughly 10-30 minutes depending on your hardware.

Installing IonCube using the CLI version of EasyApache

This method requires you to have shell access as the user root via either the console, SSH or some other means.

  1. Log into the console as root
  2. Run /scripts/easyapache
  3. Select 'Previously Saved Config' and then select 'Start customizing based on profile'
  4. Under 'Apache Version' select 'Next Step'
  5. Under 'PHP Version' select 'Next Step'
  6. Under 'Short Option Lists' check the 'IonCube Loader for PHP' and then select 'Save and Build'
  7. This process will take a while to complete, roughly 10-30 minutes depending on your hardware.

Was this answer helpful?

« Back