# Using the ionCube Loader with different PHP versions

> Use the ionCube Loader with the PHP version your site runs, on servers with or without CageFS.

Source: https://helpcenter.ruachost.com/developers/php/using-the-ioncube-loader-with-different-php-versions/

The **ionCube Loader** is a PHP extension that decodes and executes encoded PHP files at runtime. Many commercial PHP applications require ionCube Loader to function. On **ruachost.com**, ionCube Loader support depends on the PHP version and hosting environment.

## How ionCube Loader Works

- It is loaded as a **Zend extension** in PHP.
- Allows encoded scripts to run securely without exposing source code.
- Must match the PHP version you are running.

## Availability by PHP Version

- **PHP 7.x** → Fully supported with ionCube Loader.
- **PHP 8.0** → ❌ Not supported (ionCube Loader unavailable).
- **PHP 8.1** → Supported with updated loaders.
- **PHP 8.2+** → Support depends on ionCube’s official releases; check compatibility before upgrading.

## Using ionCube Loader on CageFS Servers

If your account is hosted on a server with **CageFS enabled**:

- ionCube Loader is already loaded for the default PHP version.
- When you change the active PHP version in cPanel, the corresponding ionCube Loader is automatically configured.
- No manual steps are required.

## Using ionCube Loader on Non‑CageFS Servers

If your account is hosted on a server without CageFS:

1. ### Download the Loader

   - Visit: ionCube Loaders download page
   - Download the Linux 64‑bit package.
2. ### Upload to Your Account

   - Use FTP or File Manager to upload the zip file to your home directory.
3. ### Extract the Files

   ```bash
   tar xvzf ioncube_loaders_lin_x86-64.tar.gz
   ```
4. **Edit php.ini** Add the following line (replace `X.Y` with your PHP version):

   ```
   zend_extension="/home/username/ioncube/ioncube_loader_lin_X.Y.so"
   ```
5. ### Verify Installation

   - Create a `phpinfo()` file and check for **ionCube Loader** in the output.

> **Important Notes:**
- ionCube Loader is **not available on PHP 8.0**. Use PHP 7.4 or 8.1 instead.
- Always match the loader version to your PHP version.
