Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Server Platforms
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Server Platforms
Discussion regarding any server based ubuntu release.

 
Thread Tools Display Modes
Old February 16th, 2008   #1
Jeremy23
A Carafe of Ubuntu
 
Jeremy23's Avatar
 
Join Date: Apr 2006
Location: Australia
My beans are hidden!
Hardy Heron (Ubuntu Development)
Send a message via MSN to Jeremy23 Send a message via Skype™ to Jeremy23
PHP has Suhosin by default?

I just installed and configured a LAMP server on my Hardy machine (actually, using Lighttpd instead of Apache), ran phpinfo(), and it says that the "server is protected with the Suhosin Patch 0.9.6.2".

I certainly didn't install Suhosin...

Code:
jeremy@rillian:~$ dpkg -s php5-suhosin 
Package `php5-suhosin' is not installed and no info is available.
...which leads me to the conclusion that Ubuntu ships it with Suhosin without any intervention? I have a Feisty server, and that one doesn't have Suhosin -- it only seems to apply to my Hardy machine.

Seems like a good thing to do, but there may be compatibility issues with running non-standard versions of PHP.
__________________
Jeremy Visser
Email: jeremy,visser#gmail,com
Blog: http://jeremy.visser.name/
Jeremy23 is offline   Reply With Quote
Old February 16th, 2008   #2
faulkes
Way Too Much Ubuntu
 
Join Date: Jan 2008
Location: Toronto
Beans: 308
Ubuntu 7.10 Gutsy Gibbon
Re: PHP has Suhosin by default?

Interesting, could you ouput the phpinfo() section which relates to suhosin.

Having checked launchpad for Hardy I don't see it being listed as a compiled in option or a dependency (and there is a seperate php5-suhosin package as well).

Edit: also the following may give us more information

Code:
aptitude changelog php5

and 

aptitude changelog libapache2-mod-php5
That will probably be a large file, so you may have to spend a bit of time looking through it.

Faulkes
__________________
Ubuntu Server Team Member && If your post was solved, please mark it [SOLVED] under Thread Tools
Official Gutsy 7.10 Server Documentation || Community based Server Documentation

Last edited by faulkes; February 16th, 2008 at 12:02 PM..
faulkes is offline   Reply With Quote
Old February 16th, 2008   #3
Jeremy23
A Carafe of Ubuntu
 
Jeremy23's Avatar
 
Join Date: Apr 2006
Location: Australia
My beans are hidden!
Hardy Heron (Ubuntu Development)
Send a message via MSN to Jeremy23 Send a message via Skype™ to Jeremy23
Re: PHP has Suhosin by default?

Yeah, actually, I found it in the changelog yesterday. Here's an abridged version of the changelog entry:

Quote:
php5 (5.2.4-1) unstable; urgency=low

* we shipping with the suhosin patch enabled by default.
And yes, in phpinfo(), it says:

Quote:
This server is protected with the Suhosin Patch 0.9.6.2
Copyright (c) 2006 Hardened-PHP Project
__________________
Jeremy Visser
Email: jeremy,visser#gmail,com
Blog: http://jeremy.visser.name/
Jeremy23 is offline   Reply With Quote
Old March 31st, 2008   #4
ned worcs
First Cup of Ubuntu
 
Join Date: May 2007
Beans: 1
Re: PHP has Suhosin by default?

Ive come up against this too. Ive installed Hardy beta and Suhosin has post.max_vars set at 200 which is the default causing problems with some scripts.

Whats the best way to change the value please?
ned worcs is offline   Reply With Quote
Old May 20th, 2008   #5
scaredpoet
Gee! These Aren't Roasted!
 
scaredpoet's Avatar
 
Join Date: Feb 2008
Location: USA
Beans: 170
Ubuntu 9.10 Karmic Koala
Re: PHP has Suhosin by default?

This thread needs to be revived I think. Has anyone figured out how to remove the suhosin patch from the php5 standard install in Hardy?
scaredpoet is offline   Reply With Quote
Old May 25th, 2008   #6
Jeremy23
A Carafe of Ubuntu
 
Jeremy23's Avatar
 
Join Date: Apr 2006
Location: Australia
My beans are hidden!
Hardy Heron (Ubuntu Development)
Send a message via MSN to Jeremy23 Send a message via Skype™ to Jeremy23
Re: PHP has Suhosin by default?

Let me check.

The patch is probably located in the /debian/ directory, so making a new set of debs without Suhosin should be as simple as reversing the patch.

Of course, I haven't checked yet, so this may be more complicated than it seems.
__________________
Jeremy Visser
Email: jeremy,visser#gmail,com
Blog: http://jeremy.visser.name/
Jeremy23 is offline   Reply With Quote
Old May 25th, 2008   #7
Jeremy23
A Carafe of Ubuntu
 
Jeremy23's Avatar
 
Join Date: Apr 2006
Location: Australia
My beans are hidden!
Hardy Heron (Ubuntu Development)
Send a message via MSN to Jeremy23 Send a message via Skype™ to Jeremy23
Lightbulb Re: PHP has Suhosin by default?

Before you get your hopes up, please be aware that I have not even tested to see if the following works. Seems likely that it will, though.

Okay, in the PHP5 source, there is a patch file in "debian/patches/suhosin.patch".

To get to this source, you can do: (without sudo, please)

Code:
mkdir work && cd work && apt-get source php5 && cd php5-5.2.4
Make sure you can build it by doing:

Code:
sudo apt-get build-dep php5
Okay, it looks like the patch isn't applied at this stage (it probably gets applied when you build the package), so just do this:

Code:
rm debian/patches/suhosin.patch
Now, you want to bump up the version number:

Code:
debchange -v 5.2.4-2ubuntu6~nosuhosin
If you've never built a Debian package before, that'll probably fail. To fix it, do this:

Code:
sudo apt-get install devscripts
...and run debchange again.

When you get presented with the nano text editor, just type something like "Hopefully removed Suhosin", and press Ctrl+X and Enter to save.

Should be good to build now. Do this:

Code:
debuild
You should end up with some new .deb packages:

Code:
ls -l ../*.deb
A quick and dirty way to install them (might break stuff) is:

Code:
sudo dpkg -i ../*.deb
__________________
Jeremy Visser
Email: jeremy,visser#gmail,com
Blog: http://jeremy.visser.name/
Jeremy23 is offline   Reply With Quote
Old May 25th, 2008   #8
Jeremy23
A Carafe of Ubuntu
 
Jeremy23's Avatar
 
Join Date: Apr 2006
Location: Australia
My beans are hidden!
Hardy Heron (Ubuntu Development)
Send a message via MSN to Jeremy23 Send a message via Skype™ to Jeremy23
Re: PHP has Suhosin by default?

Quote:
Originally Posted by ned worcs View Post
Ive come up against this too. Ive installed Hardy beta and Suhosin has post.max_vars set at 200 which is the default causing problems with some scripts.

Whats the best way to change the value please?
Ned, you can change these things in /etc/php5/apache2/php.ini.
__________________
Jeremy Visser
Email: jeremy,visser#gmail,com
Blog: http://jeremy.visser.name/
Jeremy23 is offline   Reply With Quote
Old June 20th, 2008   #9
bjk03
5 Cups of Ubuntu
 
Join Date: Jul 2007
Beans: 33
Ubuntu 9.04 Jaunty Jackalope
Re: PHP has Suhosin by default?

Quote:
Originally Posted by Jeremy23 View Post
Before you get your hopes up, please be aware that I have not even tested to see if the following works. Seems likely that it will, though.

Okay, in the PHP5 source, there is a patch file in "debian/patches/suhosin.patch".

To get to this source, you can do: (without sudo, please)

Code:
mkdir work && cd work && apt-get source php5 && cd php5-5.2.4
Make sure you can build it by doing:

Code:
sudo apt-get build-dep php5
Okay, it looks like the patch isn't applied at this stage (it probably gets applied when you build the package), so just do this:

Code:
rm debian/patches/suhosin.patch
Now, you want to bump up the version number:

Code:
debchange -v 5.2.4-2ubuntu6~nosuhosin
If you've never built a Debian package before, that'll probably fail. To fix it, do this:

Code:
sudo apt-get install devscripts
...and run debchange again.

When you get presented with the nano text editor, just type something like "Hopefully removed Suhosin", and press Ctrl+X and Enter to save.

Should be good to build now. Do this:

Code:
debuild
You should end up with some new .deb packages:

Code:
ls -l ../*.deb
A quick and dirty way to install them (might break stuff) is:

Code:
sudo dpkg -i ../*.deb
It did not work for me. Said it couldn't find source. What else can I do to get rid of Suhosin?
bjk03 is offline   Reply With Quote
Old June 20th, 2008   #10
Jeremy23
A Carafe of Ubuntu
 
Jeremy23's Avatar
 
Join Date: Apr 2006
Location: Australia
My beans are hidden!
Hardy Heron (Ubuntu Development)
Send a message via MSN to Jeremy23 Send a message via Skype™ to Jeremy23
Re: PHP has Suhosin by default?

That does not give me nearly enough information to let me help you.

Can you at least post the error message with the command you typed?
__________________
Jeremy Visser
Email: jeremy,visser#gmail,com
Blog: http://jeremy.visser.name/
Jeremy23 is offline   Reply With Quote

Bookmarks

Tags
php5, suhosin

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:53 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry