recompile PHP with Suhosin

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,792
Location
A Coruña, Spain
Suhosin is not part of custombuild,i think the user was just noticing that wasnt able to compile php with suhosin cause there is not suhosin for latest php 5.3.x

That's why ive suggested suhosin extension, custombuild itself doenst install suhosing patch.

Regards
 

Trismegistul

New member
Joined
Jul 7, 2012
Messages
1
Suhosin in CentOS 6.2, DirectAdmin, PHP 5.3.14 in a CGI mode?

For PHP 5.2.13:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build set clean no
tar xzf php-5.2.13.tar.gz
wget http://download.suhosin.org/suhosin-patch-5.2.13-0.9.7.patch.gz
gunzip suhosin-patch-5.2.13-0.9.7.patch.gz
patch -p0 < suhosin-patch-5.2.13-0.9.7.patch
cd php-5.2.13
`../build used_configs | grep PHP5 | cut -d: -f2`
make
make install
/etc/init.d/httpd restart
cd ..
./build set clean yes
PHP 5.3.2:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build set clean no
tar xzf php-5.3.2.tar.gz
wget http://download.suhosin.org/suhosin-patch-5.3.2-0.9.9.1.patch.gz
gunzip suhosin-patch-5.3.2-0.9.9.1.patch.gz
patch -p0 < suhosin-patch-5.3.2-0.9.9.1.patch
cd php-5.3.2
`../build used_configs | grep PHP5 | cut -d: -f2`
make
make install
/etc/init.d/httpd restart
cd ..
./build set clean yes
Restart apache using the following command on FreeBSD systems (instead of /etc/init.d/httpd restart):
Code:
/usr/local/etc/rc.d/httpd  restart
Alternative way:
Do the same to the "patch -p0 < ....." line, then open "build" file, find:
Code:
FILE=${CWD}/php-${PHP5_VER}.tar.gz
checkFile ${FILE}
echo "Extracting ...";
tar xzf ${FILE}
Replace with (comment tar line out):
Code:
FILE=${CWD}/php-${PHP5_VER}.tar.gz
checkFile ${FILE}
echo "Extracting ...";
#tar xzf ${FILE}
Save the file and run "./build php n".
I have php 5.3.14 in cgi mode, with suPhp. In php -v shows me:

Code:
[root@server custombuild]# php -v
PHP 5.3.14 (cli) (built: Jul  8 2012 03:21:20)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
What Pache should install suhosin? I tried suhosin-patch5.3.9-0.9.10.patch (0.9.10) gives me the error below:

Code:
[root@server custombuild]# patch -p0 < suhosin-patch-5.3.9-0.9.10.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nura php-5.3.9/Zend/Makefile.am suhosin-patch-5.3.9-0.9.10/Zend/Makefile.am
|--- php-5.3.9/Zend/Makefile.am 2009-03-18 11:18:10.000000000 +0100
|+++ suhosin-patch-5.3.9-0.9.10/Zend/Makefile.am        2012-01-11 19:29:07.000000000 +0100
--------------------------
File to patch:
I gave Ctrl ^ C for I did not know what to do! Please help me! How can I install suhoshin my server? I was wrong somehow Pache suhosin? :mad:

Thanks for your help!

PS: This post is automatically translated from Romanian to google. Sorry for the grammar! :)
 

Anton

Verified User
Joined
Oct 6, 2010
Messages
104
Location
Iceland
there should be somthing in custombuild to do this i think.. just my opinion
 

Anton

Verified User
Joined
Oct 6, 2010
Messages
104
Location
Iceland
hello guys i am trying to find the right suhosin for php 5.3.15 is there patch for it or will i just have to wait the forum is down on hardened-php.net and also i would really like to know
how to compile suhosin with php i will check them here in this post but if someone has a patch for that php version please do tell :D thank you all for the help.
 

FleroviumUranus

Verified User
Joined
Aug 28, 2012
Messages
94
Location
everwhere
i see a lots of issue in building php with suhosin
i think mod_ruid2 is best for getting the same with less resource
but still many using the suhosin
is suhosin any advantage which mod_ruid2 is not fulfilled
 

ehsan640

New member
Joined
Dec 25, 2012
Messages
1
hi
how can i recompile php 5.3.20 with suhosin
i tried with many instructions but no success!
csf show me warning about that

can anyone help please?
 
Top