How to Install ionCube Loader on Rocky Linux 9

Estimated reading: 3 minutes 1257 views

Introduction

Many commercial PHP applications are distributed with encrypted source code using ionCube to protect intellectual property. To run these applications, your server needs ionCube Loader, a PHP extension that decrypts and runs the encoded files at runtime.

In this guide, we’ll install ionCube Loader on Rocky Linux 9, configure it with PHP 8.1 and Apache, and verify the installation step by step.

Prerequisites

Before starting, make sure you have:

  • A Rocky Linux 9 server

  • Root or sudo access

  • A stable internet connection

  • Basic SSH knowledge

Step 1: Connect to Your Server via SSH

On Linux/macOS

ssh root@your-server-ip

Connects to your server as the root user.

On Windows

Use PuTTY, enter root@your-server-ip, and click Open.

Step 2: Install PHP 8.1 and Apache Web Server

2.1 Update System Packages

dnf update

Updates all packages to the latest available versions.

2.2 Install Required Repositories

dnf install epel-release 
dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm

Installs EPEL and Remi repositories so you can install PHP 8.1.

2.3 Enable PHP 8.1 from Remi Repo

dnf module reset php 
dnf module enable php:remi-8.1

Resets the PHP module stream and enables PHP 8.1.

2.4 Install PHP 8.1, Apache, and Extensions

dnf install php php-cli php-common php-mysqlnd php-xml php-mbstring php-curl php-zip php-gd httpd unzip wget nano

Installs PHP 8.1 core, required extensions, Apache, and basic tools.

2.5 Enable and Start Apache

systemctl enable httpd 
systemctl start httpd

Makes Apache start on boot and starts the service now.

Step 3: Install ionCube Loader

3.1 Locate PHP Extension Directory

php -i | grep extension_dir

Shows where PHP extensions are stored (usually /usr/lib64/php/modules).

3.2 Download and Extract the ionCube Loader

cd /opt 
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz 
tar -xzf ioncube_loaders_lin_x86-64.tar.gz 
cd ioncube

Downloads and extracts the ionCube Loader to /opt.

3.3 Copy ionCube Loader to the PHP Modules Directory

cp ioncube_loader_lin_8.1.so /usr/lib64/php/modules/

Copies the loader for PHP 8.1 into the PHP modules directory.

3.4 Create ionCube Configuration File

nano /etc/php.d/00-ioncube.ini

Add this line:

zend_extension=/usr/lib64/php/modules/ioncube_loader_lin_8.1.so

This tells PHP to load ionCube Loader. Save and close the file.

3.5 Restart Apache

systemctl restart httpd

Reloads Apache to apply the configuration.

Step 4: Verify ionCube Loader Installation

4.1 Check PHP Version and ionCube Status

php -v

You should see:

with the ionCube PHP Loader (enabled) ...

This confirms that ionCube Loader is working.

4.2 Create a PHP Info Test File

echo "<?php phpinfo(); ?>" > /var/www/html/info.php

Open your browser and go to:

http://your-server-ip/info.php

Check for the ionCube Loader section to confirm installation.

4.3 Clean Up Test Files

rm /var/www/html/info.php
rm -rf /opt/ioncube*

Removes the test file and installation package.


Conclusion

You have now successfully installed ionCube Loader on Rocky Linux 9 with PHP 8.1 and Apache Web Server. Your server is ready to run encrypted PHP applications. Whenever you upgrade PHP, remember to update ionCube Loader to match the PHP version to avoid compatibility issues.

Share this Doc

How to Install ionCube Loader on Rocky Linux 9

Or copy link

CONTENTS