Thursday, May 3. 2012
With the recently released PHP 5.4, the Suhosin patch and extension were removed from many Linux distribution packages (i.e., Debian et al.) and until three weeks ago, there was no possibility to compile and run the Suhosin extension under PHP 5.4. This little howto shall serve as installation instruction for Debian Wheezy users - your mileage may vary. I blogged about this here
First, make sure you have the appropriate PHP modules installed for your distribution. In Wheezy, you will need at least php5-common, php5-dev and one or more or these: libapache-mod-php5filter, php5-cli, php5-cgi
You can install them with
Next, we will download, compile and install the Suhosin extension. There is a .tar.gz download here: Github/stefanesser. Download this file to your /usr/local/src directory:
After this, you can run the usual configure command:
The last step is installation.
Now the extension is installed, but not yet configured or activated. Fortunately, Stefan has provided a default configuration file in the distribution tarball that you can just copy over.
cp suhosin.ini /etc/php5/conf.d
If you execute php -v, you should now see the following:
PHP 5.4.0-3 (cli) (built: Mar 21 2012 20:33:26)
After restarting your web server with /etc/init.d/apache2 restart, you should have a working Suhosin with PHP 5.4!
Posted by Christopher Kunz
Comment (1) Trackback (1)
Tracked: May 20, 11:03