First upgrade PHP to  the latest PHP 5.6 version.

yum --enablerepo=remi,remi-php56 install php-devel
dnf install "Development Tools"

Now, installing Suhosin.

  1. Download the patch first:
    wget https://download.suhosin.org/suhosin-0.9.38.tar.gz
  2. Extract the gunzip file:
    tar -xvf suhosin-0.9.38.tar.gz
  3. And compiling it:
    cd suhosin
    phpize
    ./configure
    make
    make install
  4. After finish compiling, use vi to add Suhosin to PHP configuration:
    vi /etc/php.d/09-suhosin.ini
  5. Inside the file, write:
    extension=suhosin.so
  6. And restart your web server, I’m using Apache, so this is the command:
    systemctl restart httpd
Advertisements