In this tutorial we will show you how to install Suhosin PHP 5 protection security patch on CentOS. For those of you who didn’t know, Suhosin patch is an advanced protection system for PHP installations. It was designed protect your servers against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself.
Install Suhosin PHP 5 Protection Security Patch on CentOS
Step 1. First let’s start by ensuring your system is up-to-date.
#yum install php-devel
#tar -xvf suhosin-0.9.35.tgz
Next, run the following commands to compile Suhosin under PHP 5:
Create the suhosin configuration, type the following command:
#echo 'extension=suhosin.so' > /etc/php.d/suhosin.ini
Restart web server Nginx, Lighttpd or Apache:
#service nginx restart
#service lighttpd restart
#service httpd restart
Suhosin should now be installed. You can check by creating a file called info.php in /var/www/html/ with the following content:
The features of the Suhosin patch are listed under Engine Protection (only with patch); all the other features come with the Suhosin extension. But if you would like configure it according to your setup, then visit the suhosin configuration page for more information.