Wednesday, October 23, 2013

Install Suhosin For PHP 5.4 On cPanel Linux

EDIT: Since the release of this article, new versions of SuHosin have been release with official PHP 5.4+ support.

Please go to:

...for the most current version.

1) Grab the current source from github:
cd /usr/local/src


tar zxvf master
2) Change to the directory just created and then prep Suhosin for PHP
cd /usr/local/src/stefanesser-suhosin-[this will change]

mv session.c session.c.old

Note: We pull the custom session.c above to fix an issue with NULL sessions in PHP 5.4, more info:

3) Configure, make and install
./configure && make && make install
4) Enable in PHP
echo >> /usr/local/lib/php.ini
5) Restart Apache and check PHP
service httpd restart

php -v
...and you should see:

PHP 5.4.21 (cli) (built: Oct 23 2013 16:48:02)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies
with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH

No comments:

Post a Comment