# Using the ionCube PHP Loader

> Run ionCube-encoded PHP applications by checking that the ionCube Loader is enabled, or installing it on your own server.

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

The **ionCube PHP Loader** is a PHP extension that decodes and executes files encoded with the ionCube Encoder. Many commercial PHP applications use ionCube to protect their source code. On **ruachost.com**, ionCube Loader is supported across hosting environments.

## What is ionCube Loader?

- A runtime extension that allows encoded PHP files to run.
- Provides protection against reverse engineering and unauthorized modification.
- Required by many third‑party applications and plugins.

## Availability on Ruachost Servers

### Shared Hosting Accounts

- ionCube Loader is **enabled by default**.
- You can verify by checking your PHP configuration with `phpinfo()`.
- If using a non‑default PHP version, additional configuration may be required.

### Managed VPS and Managed Dedicated Servers

- ionCube Loader is **enabled by default**.
- Confirm via `phpinfo()` or cPanel’s PHP Selector.

### Unmanaged VPS and Dedicated Servers

- If you install a LAMP stack using **Webuzo**, ionCube Loader is included automatically.
- If you install Apache and PHP manually, you must download and configure ionCube Loader yourself.

## Manual Installation (Unmanaged Servers)

1. ### Download ionCube Loader

   ```bash
   wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
   ```
2. ### Extract the files

   ```bash
   tar xvzf ioncube_loaders_lin_x86-64.tar.gz
   ```
3. ### Move the ionCube directory

   ```bash
   mv ioncube /usr/local
   ```
4. **Edit php.ini** Add the following line (replace `x.y` with your PHP version, e.g., `8.1`):

   ```
   zend_extension = /usr/local/ioncube/ioncube_loader_lin_x.y.so
   ```
5. ### Restart Apache

   - AlmaLinux/Fedora:

     ```bash
     service httpd restart
     ```
   - Debian/Ubuntu:

     ```bash
     service apache2 restart
     ```

     ```
     ```

## Verifying Installation

- Create a file named `info.php` with:

  ```
  <?php phpinfo(); ?>
  ```
- Access it via browser: `http://yourdomain.com/info.php`.
- Look for the **ionCube Loader** section to confirm it is active.
- Delete the file afterward for security.
