Setup Ioncube in PHP 7.4 in RunCloud/Nginx

I recently need to install Ioncube in a droplet using PHP 7.4 (yup. it’s almost 2025, and it still using PHP 7.x)

I found this docs from runcloud https://runcloud.io/blog/ioncube-loader
But it’s for general/various server. Here’s the command I use to successfully install it for PHP 7.4

Download and extract:

cd /tmp/
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -zxvf ioncube_loaders_lin_x86-64.tar.gz

Copy and update PHP ini:

cp ioncube/ioncube_loader_lin_7.4.so /RunCloud/Packages/php74rc/lib/php/extensions/no-debug-non-zts-20190902
echo "zend_extension=ioncube_loader_lin_7.4.so" > /etc/php74rc/conf.d/ioncube.ini
systemctl restart php74rc-fpm

Confirm:

/RunCloud/Packages/php74rc/bin/php -m | grep -i ioncube

And all working correctly (at least in my test).
However, if you encounter issue. Here’s how to solve it:

How to solve:

  • Ioncube provided a loader wizard: https://www.ioncube.com/loaders.php
  • You can simply download the single PHP file.
  • Upload it in your server.
  • Run it in your browser
  • And it will show how to install it properly or if there’s a miss-configuration.
  • Very neat!

SECURITY NOTE: always delete this file after use.