Enabling ionCube Loader

 

Overview

You can install the ionCube Loader PHP extension on DreamHost to run PHP files encoded with the ionCube PHP Encoder. Note that ionCube is not supported on DreamPress — WordPress sites that need it must use a Managed VPS or Web Hosting plan. This article walks you through downloading, installing, and activating ionCube Loader.

DreamPress plans

ionCube Loader is not supported with DreamPress. If you require ionCube with WordPress, the only option is to downgrade to a Managed VPS or Web Hosting plan.

How do I install ionCube Loader?

The following steps explain how to download, install, and activate ionCube Loader on your website.

 

How do I confirm my site's PHP version?

Confirm the version of PHP currently running on your site by creating a file named phpinfo.php in your website's directory.

When you visit your phpinfo.php file in a browser, the PHP version displays at the top. You will need to use the specific ionCube file below for this version of PHP.

The following instructions use PHP 8.4. Make sure to change this to the version your website is using.

How do I download and upload the ionCube loader files?

You have two options to download ionCube files.

  • Download in a browser and upload them to your server via FTP.
  • (Advanced) Download and extract the files via SSH on your DreamHost server.

Option 1 — Download in a browser and upload via FTP

  1. Visit the download ionCube page.

  2. Click the zip link next to the Linux (64 bits) option.
  3. On your computer, navigate to the location you downloaded the file. This is usually the /downloads directory.
  4. Extract the zip file.
    • Windows: right-click and choose Extract All.... This extracts the files into a new folder named ioncube.
    • Mac: double-click the file to automatically extract the files into a new folder.
  5. Connect to your domain via FTP.
  6. In the left pane (your computer), navigate to the directory you just extracted the files into.
  7. In the right pane (your server), navigate to your user's directory under /home/username. View the FTP article for details.
  8. In this same directory, create a new directory named ioncube.
  9. Navigate into this new /home/username/ioncube directory.
  10. Upload the ioncube_loader_lin_8.4.so file from your computer into this directory.

Option 2 — Download and extract via SSH

  1. Log into your server via SSH.
  2. Run the following commands in order:

    [server]$ cd ~
    [server]$ wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
    [server]$ tar -zxvf ioncube_loaders_lin_x86-64.tar.gz -C $HOME
    [server]$ rm ioncube_loaders_lin_x86-64.tar.gz
  3. List all files.

    [server]$ ls -la
  4. You will see several files in your /home/username/ioncube directory that appear like this:

    ioncube_loader_lin_8.4.so

How do I activate ionCube loader?

This step activates ionCube on your website by adding a line to your phprc file.

Make sure to add the following line to the top of the phprc file.

Your site may throw a 500 error if you place this code anywhere else.

  1. Navigate to the /home/username/.php/8.4 directory.

    Make sure to navigate into the same number directory as your site's PHP version above.

  2. Edit the phprc file on your server to add the following line using FTP or SSH.

    zend_extension = /home/username/ioncube/ioncube_loader_lin_8.4.so
  3. After saving your changes, kill off all PHP processes to complete the installation.

How do I confirm it's loaded?

Confirm that ionCube is loaded by navigating to your website and viewing your phpinfo.php file. You will see the following:

ioncube-loader.png

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?