Hello all, just adding my procedure for adding suhosin extension to PHP 5.3.11 cgi. There are extensive how to's but nothing worked for me. Tried quite a few of them and always got this error
PHP Warning: PHP Startup: suhosin: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20090626
Prerequisite: you can have any version of php cgi installed only difference is the Suhosin version that you need.
My current setup is PHP 5.3.11 suphp with zend
PHP5 installation directory : /usr/local/php5/
PHP5 ini : /usr/local/etc/php5/cgi/php.ini
if yours is different please change the paths in commands.
1) change directory to php bin
2) Download suhosion/untar and go to directory
3) PHPIZE with correct phpize : check your path after sudo
4) Enable and configure suhosin : check path for correct php-config
5) You will get message that extension has created in file:
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626
we need to add this to php.ini file to load suhosin.so
1) if you already have path configured in php.ini or want to move it different extension directory then just add/edit path in php.in file move suhosin.so to that directory from :
to that directory and add line in extension block
2) Or you can simply add full path in php.ini.
find the extension block and add this in the start
That's it, check your php version
php -v
or from browser
PHP Warning: PHP Startup: suhosin: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20090626
Prerequisite: you can have any version of php cgi installed only difference is the Suhosin version that you need.
My current setup is PHP 5.3.11 suphp with zend
PHP5 installation directory : /usr/local/php5/
PHP5 ini : /usr/local/etc/php5/cgi/php.ini
if yours is different please change the paths in commands.
1) change directory to php bin
cd /usr/local/php5/bin
2) Download suhosion/untar and go to directory
3) PHPIZE with correct phpize : check your path after sudo
sudo /usr/local/php5/bin/phpize
4) Enable and configure suhosin : check path for correct php-config
sudo ./configure --enable-suhosin --with-php-config=/usr/local/php5/bin/php-config
sudo make
sudo make install
5) You will get message that extension has created in file:
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626
we need to add this to php.ini file to load suhosin.so
1) if you already have path configured in php.ini or want to move it different extension directory then just add/edit path in php.in file move suhosin.so to that directory from :
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/suhosin.so
to that directory and add line in extension block
extension=suhosin.so
2) Or you can simply add full path in php.ini.
vi /usr/local/etc/php5/cgi/php.ini
find the extension block and add this in the start
extension=/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/suhosin.so
That's it, check your php version
php -v
PHP 5.3.13 (cli) (built: May 15 2012 10:42:54)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH
or from browser
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH