We are running PHP 5.6 and Apache 2 on our test system. Lets see how we can install and configure this extension there.
First of all, go to /usr/src directory by running the following command:
Here create a new directory named “loader” by running the following command.
Now go into this newly created directory.
And download Source Guardian tar file here.
For 32bit system:
For 64bit system:
As soon as the file has been download, extract it by running the following command:
That’s all, Now we need to copy the loader configuration file to PHP extenstion directory. Please note that if your PHP version is different, then you might have different folder/file name, run command accordingly.
Create a file for sourceguardian inside PHP5 mod’s directory i.e. /etc/php5/mods-available/, run following command to create file.
It will create an empty file in GEdit text editor, paste following content in this empty file. [Change your path or file names in case you are using different version of PHP]
Save the file and return back to the terminal windows. Run following command to enable this extension.
We are almost there, restart apache web server by running the following command:
Congratulations, SourceGuardian has been installed and enabled for your PHP now
In order to verify it, we need to see the output of phpinfo() function. Go to /var/www/html directory by running the following command.
Create an empty file here, named phpinfo.php by running the following command.
And paste following code in this file.