← ServerPilot Docs

How to Install SourceGuardian

In this tutorial, we'll show you how to install the SourceGuardian PHP encoder on your servers.

This tutorial assumes you have already connected your server to ServerPilot.

Download, Extract, and Configure

To install SourceGuardian, SSH in to your server as the root user and run the following commands for the PHP version you're adding SourceGuardian to.

PHP 5.4

sudo mkdir /usr/local/sourceguardian
cd /usr/local/sourceguardian
sudo wget http://www.sourceguardian.com/loaders/download/loaders.linux-x86_64.tar.gz
sudo tar xzf loaders.linux-x86_64.tar.gz
sudo cp ixed.5.4.lin /opt/sp/php5.4/lib/php/extensions/no-debug-non-zts-20100525/
sudo bash -c 'echo "zend_extension=/opt/sp/php5.4/lib/php/extensions/no-debug-non-zts-20100525/ixed.5.4.lin" > /etc/php5.4-sp/conf.d/sourceguardian.ini'
sudo service php5.4-fpm-sp restart

PHP 5.5

sudo mkdir /usr/local/sourceguardian
cd /usr/local/sourceguardian
sudo wget http://www.sourceguardian.com/loaders/download/loaders.linux-x86_64.tar.gz
sudo tar xzf loaders.linux-x86_64.tar.gz
sudo cp ixed.5.5.lin /opt/sp/php5.5/lib/php/extensions/no-debug-non-zts-20121212/
sudo bash -c 'echo "zend_extension=/opt/sp/php5.5/lib/php/extensions/no-debug-non-zts-20121212/ixed.5.5.lin" > /etc/php5.5-sp/conf.d/sourceguardian.ini'
sudo service php5.5-fpm-sp restart

PHP 5.6

sudo mkdir /usr/local/sourceguardian
cd /usr/local/sourceguardian
sudo wget http://www.sourceguardian.com/loaders/download/loaders.linux-x86_64.tar.gz
sudo tar xzf loaders.linux-x86_64.tar.gz
sudo cp ixed.5.6.lin /opt/sp/php5.6/lib/php/extensions/no-debug-non-zts-20131226/
sudo bash -c 'echo "zend_extension=/opt/sp/php5.6/lib/php/extensions/no-debug-non-zts-20131226/ixed.5.6.lin" > /etc/php5.6-sp/conf.d/sourceguardian.ini'
sudo service php5.6-fpm-sp restart

PHP 7.0

sudo mkdir /usr/local/sourceguardian
cd /usr/local/sourceguardian
sudo wget http://www.sourceguardian.com/loaders/download/loaders.linux-x86_64.tar.gz
sudo tar xzf loaders.linux-x86_64.tar.gz
sudo cp ixed.7.0.lin /opt/sp/php7.0/lib/php/extensions/no-debug-non-zts-20151012/
sudo bash -c 'echo "zend_extension=/opt/sp/php7.0/lib/php/extensions/no-debug-non-zts-20151012/ixed.7.0.lin" > /etc/php7.0-sp/conf.d/sourceguardian.ini'
sudo service php7.0-fpm-sp restart

PHP 7.1

sudo mkdir /usr/local/sourceguardian
cd /usr/local/sourceguardian
sudo wget http://www.sourceguardian.com/loaders/download/loaders.linux-x86_64.tar.gz
sudo tar xzf loaders.linux-x86_64.tar.gz
sudo cp ixed.7.1.lin /opt/sp/php7.1/lib/php/extensions/no-debug-non-zts-20160303/
sudo bash -c 'echo "zend_extension=/opt/sp/php7.1/lib/php/extensions/no-debug-non-zts-20160303/ixed.7.1.lin" > /etc/php7.1-sp/conf.d/sourceguardian.ini'
sudo service php7.1-fpm-sp restart

PHP 7.2

sudo mkdir /usr/local/sourceguardian
cd /usr/local/sourceguardian
sudo wget http://www.sourceguardian.com/loaders/download/loaders.linux-x86_64.tar.gz
sudo tar xzf loaders.linux-x86_64.tar.gz
sudo cp ixed.7.2.lin /opt/sp/php7.2/lib/php/extensions/no-debug-non-zts-20170718/
sudo bash -c 'echo "zend_extension=/opt/sp/php7.2/lib/php/extensions/no-debug-non-zts-20170718/ixed.7.2.lin" > /etc/php7.2-sp/conf.d/sourceguardian.ini'
sudo service php7.2-fpm-sp restart

PHP 7.3

SourceGuardian does not yet support PHP 7.3.

Verifying the Installation

You can verify SourceGuardian is installed correctly by running the command:

phpX.Y-sp -i | grep SourceGuardian

You should see output like the following:

    with SourceGuardian v11.1.1, Copyright (c) 2000-2017, by SourceGuardian Ltd.
SourceGuardian
SourceGuardian Loader Support => enabled
SourceGuardian Loader Version => 11.1.1
SourceGuardian Loader Build Number => 0x00000019

Uninstalling the SourceGuardian Extension

To uninstall this extension, as root run the command:

sudo rm /etc/phpX.Y-sp/conf.d/sourceguardian.ini

Next, restart PHP-FPM with the command:

sudo service phpX.Y-fpm-sp restart
Last updated: October 8, 2018

Launch your first site in 5 minutes