Debian 8 and Ubuntu 14.04 LTS Install Suhosin PHP Extension To Protect Your Server

Debian 8 and Ubuntu 14.04 LTS Install Suhosin PHP Extension To Protect Your Server

To install the Suhosin PHP extension on Debian 8 or Ubuntu 14.04 LTS, follow these steps:

  1. Install the necessary dependencies:
refer to:‮uttual‬ri.com
sudo apt-get update
sudo apt-get install build-essential php5-dev
  1. Download the Suhosin source code:
wget https://download.suhosin.org/suhosin-0.9.38.tgz
tar xvzf suhosin-0.9.38.tgz
cd suhosin-0.9.38
  1. Compile and install the Suhosin extension:
phpize
./configure
make
sudo make install

The make install command will install the Suhosin extension to the /usr/lib/php5/20121212 directory.

  1. Edit the php.ini file to enable the Suhosin extension:
sudo nano /etc/php5/apache2/php.ini

Add the following line to the end of the file:

extension=suhosin.so
  1. Restart the Apache web server to apply the changes:
sudo service apache2 restart

That's it! The Suhosin extension should now be installed and enabled on your system. You can verify that the extension is loaded by creating a PHP file with the following contents:

<?php
phpinfo();
?>

Then, open the PHP file in a web browser and look for the "Suhosin" section in the output. If the extension is installed and enabled, you should see information about the extension in this section.

Created Time:2017-10-28 14:02:24  Author:lautturi