alexandz

Well-Known Member
Oct 28, 2011
111
0
66
Chile
cPanel Access Level
Root Administrator
Hi, yesterday compile suhosin EasyApache to install php and went well, but then check the logs and I found the following:

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

How I can fix it?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Hi, yesterday compile suhosin EasyApache to install php and went well, but then check the logs and I found the following:

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

How I can fix it?
The feature request forum is not a forum to post anything other than feature requests. I figured I would mention this since you have done this twice. I am moving your request to one of our technical support forums so you can receive appropriate assistance.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello alexandz,

The choices would be to either upgrade to PHP 5.3 rather than using PHP 5.2 or to manually install a SuHosin version that supports PHP 5.2 using something like the following:

Code:
cd ~
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
 

Metro2

Well-Known Member
May 24, 2006
530
76
178
USA
cPanel Access Level
Root Administrator
Hello alexandz,

The choices would be to either upgrade to PHP 5.3 rather than using PHP 5.2 or to manually install a SuHosin version that supports PHP 5.2 using something like the following:

Code:
cd ~
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
Tristan, I have a few questions if you don't mind... if I follow the above method:

- I first run EasyApache and un-check the Suhosin option and recompile, correct?

- Will de-selecting suhosin on EasyApache and recompiling un-install 0.9.33 ?

- If I go to the manual installation of 0.9.31 will it complicate / inhibit my ability to eventually go back to using EasyApache for suhosin (eg: if I can ever get rid of older script users and finally upgrade to php 5.3.x) ?

If you (or anyone) wouldn't mind posting a few details / discussion about this I'd greatly appreciate it. I'm in a bit of jam since I have multiple servers running php 5.2.17 and I can't go any higher because 5.3.x breaks some user scripts.

Thanks for any thoughts, opinions, and advice from anyone!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Rather than running EasyApache, simply uninstall SuHosin using the PHP extension manager, which does the same task:

Code:
/usr/local/cpanel/scripts/phpextensionmgr uninstall PHPSuHosin
If you uninstall it, you'll have the /usr/local/lib/php.ini file remove the suhosin.so extension and it will also be removed from /usr/local/lib/php/extensions/no-debug-non-zts-20060613 location. If you install it manually after that, it would put a new suhosin.so file into /usr/local/lib/php/extensions/no-debug-non-zts-20060613 spot. You will need to add the extension="suhosin.so" line at the end of /usr/local/lib/php.ini file, though.

If you manually install it, it doesn't inhibit any ability to go back to using the version in EasyApache. You would need to always keep a backup copy of suhosin.so file from /usr/local/lib/php/extensions/no-debug-non-zts-20060613 in /root or somewhere, because any time you update EasyApache, it will wipe that file due to the manual compilation of SuHosin on the machine. You'll also need to re-add the suhosin.so line each time you update using EasyApache.

You could always create a /usr/local/cpanel/scripts/posteasyapache script hook to readd the extension line and recopy the suhosin.so file into that directory from a backup. Here's an example of what you could use (and, yes, this would need to be removed if you ever do update to PHP 5.3 and want to use our SuHosin copy):

First, copy suhosin.so

Code:
cp /usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so /root/suhosin.so
Then create /usr/local/cpanel/scripts/posteasyapache file with these contents:

Code:
#!/bin/bash

cp /root/suhosin.so /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
grep -q 'extension="suhosin.so"' /usr/local/lib/php.ini || echo 'extension="suhosin.so"' >> /usr/local/lib/php.ini
/etc/init.d/httpd restart
Now, give the file execution permission:

Code:
chmod +x /usr/local/cpanel/scripts/posteasyapache
Going forward, when you run EasyApache, ensure SuHosin is unchecked during the EasyApache build and the copy of the suhosin.so you'd previously built manually will be copied to the /usr/local/lib/php/extensions/no-debug-non-zts-20060613 directory. You'll also add the extension to /usr/local/lib/php.ini file only if it doesn't already exist in the file (that's the purpose of the grep).
 

fcbinfo

Well-Known Member
Dec 10, 2006
111
3
168
cPanel Access Level
Root Administrator
My server have 2 folders:
extensions/no-debug-non-zts-20060613/
extensions/no-debug-non-zts-20090626/

I solved this doing this on the 2 folders:

mv suhosin.so suhosin.bak

Get the suhosin.so from my other server with php 5.2.17 and put this inside this 2 directories.

Here the file suhosin.so from my server with 5.2.17 -removed- if someone need it.

This file is in the zip format, for me, the best way to put this file inside the server, is using winscp. (windows here)

Sorry about bad english =)
 
Last edited by a moderator:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
The no-debug-non-zts-20090626 folder is used by PHP 5.3 to my knowledge. You have no need to use it for PHP 5.2 and why the instructions are for the no-debug-non-zts-20060613 folder instead.
 

golden_eyes

Well-Known Member
Aug 9, 2010
88
1
58
Hello alexandz,

The choices would be to either upgrade to PHP 5.3 rather than using PHP 5.2 or to manually install a SuHosin version that supports PHP 5.2 using something like the following:

Code:
cd ~
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
I ran the above commands in order to install the suhosin but there is noting changed? how I can know that the suhosin is enabled? My php version is 5.2.17 and the Suhosin is not exists in the EasyApache

Please note that the extension_dir = /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ already added to the php.ini
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
There were more commands besides those entered in your reply. Did you copy the suhosin.so to the right folder and all?
 

arabgenius

Member
Jun 25, 2011
19
0
51
thank you
I just renamed the existed suhosin.so
then I install old version manually
---------------
cd ~
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
---------------------
then I added the line to php.ini
extension="suhosin.so"

and it works fine