Skip to content

Instantly share code, notes, and snippets.

@americkson
Last active August 4, 2023 19:11
Show Gist options
  • Save americkson/cdfb7c24d41d5aefcf42 to your computer and use it in GitHub Desktop.
Save americkson/cdfb7c24d41d5aefcf42 to your computer and use it in GitHub Desktop.
Ioncube Install - Nginx

Ioncube Install - Nginx

This guide will help with install ioncube loader on an Nginx web server http://www.ioncube.com/loaders.php

** In this guide there are some specific directories that might not be the same for all environments

Check your version of PHP

This is needed to know which ioncube extension you will need to use. For example, if you are running php 5.5 you will need the ioncube_loader_lin_5.5.so file

php -v

Change directory to your PHP extensions location

cd /usr/lib/php5/20121212

** the /20121212 might be different for your environment

Get Ioncube

wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

Extract Ioncube package

This will create a new directory called **ioncube

tar -xvf ioncube_loaders_lin_x86-64.tar.gz

Get the proper Ioncube file & remove the other files

mv ./ioncube/ioncube_loader_lin_5.5.so ./
rm -Rf ./ioncube

Link the ioncube extension to the PHP conf

cd /etc/php5/mods-available

Create file

sudo touch ioncube.ini

Edit file

sudo vim ioncube.ini

** Add this line to the file

zend_extension = /usr/lib/php5/20121212/ioncube_loader_lin_5.5.so

Create symlinks: You will need to create symlinks in the cli and fpm folders

notice the "01-" infront of the symlink. This is to give it priority when loading the php.ini

sudo ln -s ../../mods-available/ioncube.ini ./01-ioncube.ini

Restart PHP-FPM

sudo service php5-fpm restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment