HostOnNet Blog

Install phpShield on Cpanel Server

To install phpShield, download phpShield from

Always visit web site and download latest version.

Download and extract

mkdir /usr/local/src/phpshield
cd /usr/local/src/phpshield
tar zxvf ixed4.lin.x86-64.tar.gz

ixed4.lin.x86-64.tar.gz contains multiple files with .lin extension, these are modules for different versions of PHP. You need to copy appropriate version for your PHP to extension_dir folder.

Lets find PHP Version with php -v command.

root@server46 [~]# php -v
PHP 5.3.29 (cli) (built: Jul  5 2015 15:31:14) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
    with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd.
root@server46 [~]# 

We have PHP 5.3, so we need to copy file ixed.5.3.lin

We need to find extension_dir, this is the folder where we have to put php modules, so PHP will load it.

php -i|grep extension_dir

On this server, we have

root@server46 [/usr/local/src/phpshield]# php -i|grep extension_dir
extension_dir => /usr/local/lib/php/extensions/no-debug-non-zts-20090626 => /usr/local/lib/php/extensions/no-debug-non-zts-20090626
sqlite3.extension_dir => no value => no value
root@server46 [/usr/local/src/phpshield]# 

So we have to copy the .lin file to this folder.

cp /usr/local/src/phpshield/ixed.5.3.lin /usr/local/lib/php/extensions/no-debug-non-zts-20090626

Edit php.ini file.

vi /usr/local/lib/php.ini



Add Below


Now check if module is loaded properly

root@server46 [~]# php -m | grep SourceGuardian
root@server46 [~]# 

Restart Apache

service httpd restart

If you are using CloudLinux/CageFS, you need to run following command every time you make changes to php.ini or any other programs

cagefsctl --force-update

Posted in Cpanel Server