Install Suhosin PHP Protection Security Patc on Linux

A number of open source application are most popular wide across the web, therefore its security becomes an important concern to the developers, providers and additional significantly the users. To protect the applications developed in PHP, Suhosin is strongly recommended. The Suhosin patch offers great facilitate with protecting the PHP primarily based application from being completely exploited. The patch is taken into account to supply a advanced protection system for PHP installations. the main idea behind designing Suhosin was, to offer protection for servers against numerous attacks and different best-known problems in PHP.

How do I install Suhosin under different Linux Distributions ? (RHEL / CentOS / Fedora)

Step 1 : Download latest version of Suhosin, enter the following command for that purpose

# cd /opt
# wget http://download.suhosin.org/suhosin-0.9.32.1.tgz

NOTE : You must ensure that php-devel is installed:

# yum install php-devel

Step 2 : Then Compile Suhosin under PHP and RHEL / CentOS Linux using the below commands

# cd suhosin-0.9.32.1
# phpize
#./configure
# make
# make install

Step 3 : The Configure Suhosin onto the server, using the below command a configuration file of Suhosin would be created

# echo ‘extension=suhosin.so’ > /etc/php.d/suhosin.ini

Step  4 : Using the below command you must not restart the server

# service httpd restart

NOTE : Incase you have lighttpd activated on the server, you must use the below command to restart it

# service lighttpd restart

Step 5 : Now you must recheck whether Suhosin has been installed on the server. Using the below command you may do so

$ php -v

NOTE : You may run the following command to check for more details

<?php
phpinfo();
?>