ionCube is a tool to protect software written using the PHP programming language from being viewed, changed, and run on unlicensed computers.

Some applications such as FileRun require ionCube to be run, so let’s meet the requirement and then install it.

sudo apt update && sudo apt upgrade -y
cd /tmp
sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz -C /usr/local

Localize the configuration file (php.ini) for the webserver in your system:

locate php.ini

Append this line under the block [PHP]:

zend_extension = /usr/local/ioncube/

Restart your webserver (Apache) and the PHP engine:

sudo systemctl restart apache2.service
sudo systemctl restart php7.0-fpm.service

Issue ‘php -v‘ and check if you get ionCube active in your server:

PHP 7.4.8 (cli) (built: Jul 13 2020 16:46:22) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.4.1, Copyright (c) 2002-2020, by ionCube Ltd.
with Zend OPcache v7.4.8, Copyright (c), by Zend Technologies

FileRun: Creating Empty Database, User, and granting Privileges to it:

mysql -u root -p

Issue the following commands inside the MySQL terminal:

mysql> CREATE DATABASE filerun_db;
mysql> CREATE USER 'filerun_user'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL ON filerun_db.* to 'filerun_user'@'localhost';
mysql> EXIT;

Replace ‘filerun_db‘, ‘filerun_user‘, and ‘password‘ as required.

Download the latest version of FileRun to the root of your webserver.

cd /var/www/html/
sudo wget -O
sudo unzip
sudo chown -R www-data:www-data /var/www/html/

Try to access the FileRun with the Browser. For example:   OR

You will have to inform the credentials to access the database.

MySQL Hostname: localhost
Database Name: filerun_db
MySQL User: filerun_user
User's Password: password

It will create one user called ‘superuser‘ and a random password, copy this password to make the first access and change it immediately.

To increase the security of your server, remove certain privileges from the user in the MySQL terminal.

REVOKE ALTER, DROP ON filerun_db.* FROM 'filerun_user'@'localhost';

This process has to be done after the installation, and before updates of the FileRun will be necessary to re-apply the privileges. See how in the command below:

GRANT ALTER, DROP ON filerun_db.* TO 'filerun_user'@'localhost';

To protect the FileRun files change directory permission as follows.

sudo chown -R root:root /var/www/html

Then allow alterations only in the following directory:

sudo chown -R www-data:www-data /var/www/html/system/data

The data directory can also be moved to outside the range of the webserver:

sudo mkdir /data
sudo chown www-data:www-data /data

Than go to Settings > Admin > Users > ‘Select the User’ > Edit > Permissions > Home Folder > Path and place: /data

One Reply to “Installing ionCube and FileRun on Ubuntu 20.04”

Comments are closed.