How to Install PHP 5.6 with Suhosin on CentOS 7

How to Install PHP 5.6 with Suhosin on CentOS 7

Install Epel Repos for CentOS 7

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

sudo rpm -Uvh epel-release-7*.rpm

Install IUS repo

wget https://centos7.iuscommunity.org/ius-release.rpm

sudo rpm -Uvh ius-release.rpm<

Install yum-plugin-replace

yum –y install yum-plugin-replace

Install PHP 5.6

yum -y replace php-common --replace-with=php56u-common

Patch PHP with Suhosin 0.9.38

cd /tmp

wget -nv -O suhosin.zip https://github.com/stefanesser/suhosin/archive/0.9.38.zip

unzip -q suhosin.zip

rm -f suhosin.zip

cd suhosin-suhosin-0.9.38

phpize &> /dev/null

./configure &> /dev/null

make &> /dev/null

make install

cd ..

rm -rf suhosin-suhosin-0.9.38

Verify PHP and Suhosin

php -v