Categories
cPanel Dedicated Server PHP Security Setup

PHP Warning – PHP Startup – Suhosin Extension does not officially support PHP 5.2

PHP Warning: PHP Startup: Suhosin Extension
does not officially support PHP 5.2 and below anymore, because it is
discontinued. Use it at your own risk. in Unknown on line 0

Since the php upgrade, you might have noticed these type of errors in your server logs. Must be wondering a perfect solution for this.

Actually you should be able to use the latest build, however some older scripts or applications might get in trouble, unless they are ready for latest php version. You need not to worry any more, as you have jumped to right place for it. Just follow the below given steps and you will be at rest.

What to do?

Easy enough, downgrade suhosin from 0.9.33 to 0.9.31 :

# remove suhosin from easyapache php config
/usr/local/cpanel/scripts/phpextensionmgr uninstall PHPSuHosin

# download and install older suhosin
wget http://download.suhosin.org/suhosin-0.9.31.tgz
tar zxf suhosin-0.9.31.tgz
cd suhosin-0.9.31
phpize
./configure
make
make install

#open php.ini and add line loading suhosin
vi /usr/local/lib/php.ini

#Add following line into extensions section:
extension=”suhosin.so”

Save and close the file,  restart apache and you are done. You can also verify if everything is ok with the command php -v from the prompt.

Related: Web Server, Virtual Server, PHP Host, cPanel Host