Question
How to install SourceGuardian PHP extension?
Answer
In the following example SourceGuardian extension is installed for the PHP version 7.0:
1.Log in to the server via SSH.
2.Download SourceGuardian:
#mkdir /root/sourceguardian
# cd /root/sourceguardian
# wget --user-agent="Mozilla" http://www.sourceguardian.com/loaders/download/loaders.linux-x86_64.tar.gz
# tar xzf loaders.linux-x86_64.tar.gz
3.Copy the .lin file with the version 7.0 to the modules directory of the PHP version 7.0:
#cp ixed.7.0.lin /opt/plesk/php/7.0/lib64/php/modules
4.Create the .ini file and enable extension there:
#echo "zend_extension=/opt/plesk/php/7.0/lib64/php/modules/ixed.7.0.lin" > /opt/plesk/php/7.0/etc/php.d/sourceguardian.ini
5.Restart the Apache service:
#service httpd restart
6.Check that SourceGuardian has been installed:
#/opt/plesk/php/7.0/bin/php -v
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.7, Copyright (c) 2002-2016, by ionCube Ltd.
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
with SourceGuardian v11.1.0, Copyright (c) 2000-2017, by SourceGuardian Ltd.
Note: To install SourceGuardian on another PHP version, use an appropriate PHP version in the path /opt/plesk/php/X.X/lib64/php/modules/ixed.X.X.lin , where X.X is a PHP version.
Note: Domains using SourceGuardian module may need to switch PHP handler run PHP as FPM in Domains > example.com > PHP Settings