How can I install ionCube loader libraries?


  • Applies to: Grid
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: SSH, FTP
  • Applies to: WordPress
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: SSH, FTP
  • Applies to: DV
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: None
  • Applies to: DV 4.0
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: None

IonCube Loader libraries are already installed on this service by default.

This article will assist you with installing the ionCube libraries on a particular domain on your Grid and modify your php.ini file to direct Apache to use them.

Installing ionCube loader libraries

  1. First, we will download the libraries from the ionCube website and then upload them to your server in the correct directory.
    1. Download the Linux x86-64 version libraries from http://www.ioncube.com/loaders.php. Please be sure to download the 64-bit version, as all (mt) servers utilize 64 bit architecture. 
    2. Unarchive these files on your local computer. You should now have a folder called "ioncube" with the libraries inside it.
    3. Connect to your server with FTP.
    4. Navigate to your /home/00000/domains/example.com/ directory. Please replace 00000 with your site number, and example.com with your domain name.
    5. Upload the entire folder called ioncube to your server, along with all of its contents.

      You should now have a folder directly inside your domain folder called ioncube which has the library files inside of it.

      Via SSH

      Alternatively, you can download and extract the libraries via SSH. Run these commands separately:

      Move to the correct directory (replace with your own site number and domain name):

      
      cd /home/00000/domains/example.com/
      
      

      Download the files:

      wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

      Extract the files:

      tar zxvf ioncube_loaders_lin_x86-64.tar.gz
  2. Next, we will configure your server to use the libraries.
    1. In your FTP software, navigate to /home/00000/etc/.
    2. By default, there is a file called php.ini.sample. Download a copy of this file.
    3. In a plain text editor, such as Notepad, open the file and add these lines at the top - they MUST be at the top:
      php.ini
      zend_extension = /home/00000/domains/example.com/ioncube/ioncube_loader_lin_5.3.so

      Be sure to replace 00000 with your site number, and example.com with your domain name.

    4. Save the file with the name php.ini.
    5. Upload the file to your /home/00000/etc/ directory, where you originally downloaded it.

      Via SSH

      Alternatively, you can run the following command in SSH to modify your php.ini file (replace 00000 with your site number):

      vim /home/00000/etc/php.ini
      

      Add the lines from Step (c) above to the top of your php.ini file. Save and quit.

      vim tip: Press "i" to enter "insert mode" so you can type and copy/paste. Press "Esc" to exit "insert mode" when you are done modifying the file. Type ":wq" to save and quit.

  3. Check that the module was successfully installed by visiting your PHP Info page. You can access this from the AccountCenter. Click on your primary domain, then on PHP Settings, then the link for PHP Stable or PHP Latest. Or, you can visit these URLs directly (replace 00000 with your site number):

    http://s00000.gridserver.com/gs-bin/phpinfo.php5

    You will see the ionCube Loader mentioned in the Zend Engine section near the top, and also listed in the Additional Modules section.

Overview

This article will walk you through enabling ionCube for a WordPress account. The ionCube loader is a popular PHP module that makes it possible to use software that has been encoded using ionCube. Developers often use ionCube to protect their proprietary PHP builds.

Instructions

1. First, we will download the libraries from the ionCube website and then upload them to your server in the correct directory.

    1. Download the Linux x86-64 version libraries from ionCube. Please be sure to download the 64-bit version, as all (mt) servers utilize 64 bit architecture.
    2. Unarchive (unzip) these files on your local computer. You should now have a folder called "ioncube" with the libraries inside it.
    3. Connect to your server with SFTP. In order to connect using SFTP, you must have SSH enabled in the account center. Once connected, you should be in your home directory.
    4. Upload the entire folder called ioncube to your server, along with all of its contents. Ioncube may also be served from the data directory, but for the purpose of this tutorial, we will be using the home directory. On your SFTP terminal, use 'put' to upload the files. Alternatively, you may also upload using an FTP client such as FileZilla or CoffeeCup.
  • put path/to/ioncube

2. We'll use the ionCube Loader wizard to configure the libraries. Open a browser and navigate to the wizard. Make sure you replace "yourDomain" with your actual domain. 

  • yourDomain.com/ioncube/loader-wizard.php

3. Select "shared" and enter godaddy.com as the provider when prompted. GoDaddy is Media Temple's parent company. This will not effect anything regarding your account.

4. Click next. You may receive a warning stating that the zend extension is not available. This is normal and will not impact setup. 

5. The wizard should have created a php.ini file and placed it in the root of your account. Connect to your server using SSH and edit this file using vim or a similar utility. Help with BASH text editors may be found here. Replace X.X with your PHP version and add this line to the top of the php.ini file:


[ZEND]"zend_extension = /usr/local/ioncube/ioncube_loader_lin_X.X.so"

6. If you refresh the wizard, it is likely that you will see a message stating that your server is not reading the configuration file. You can either manually kill the php process via SSH, or simply wait up to 10 minutes.

ionCube is now enabled on your Managed WordPress account. After the php process has stopped, refreshing the wizard should return this:

Your Managed WordPress account is now able to work with ionCube encoded files. You may also test it by creating a quick php info page