Home Private Messages Search
CPG Dragonfly™ CMS stopsoftwarepatents.eu petition banner
Toggle Content
 
Forums ⇒ Miscellaneous ⇒ Server Chat ⇒ Server Issues with 9.2 (suhosin)


Server Issues with 9.2 (suhosin)
Talk about good (DedicatedNOW) and bad (AdventureHost) hosts, or any other question about servers and hosting, but no advertising or pricing in any form.
Go to page 1, 2, 3, 4, 5, 6  Next
Post new topic    Reply to topic    Printer Friendly Page     Forum Index ⇒  Server Chat

View previous topic :: View next topic  
Author Message
alyssa
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Nov 15, 2004
Posts: 773

PostPosted: Sun Jun 15, 2008 6:50 am
Post subject: Server Issues with 9.2 (suhosin)

darkgrue wrote:

Two settings have to be changed in php.ini from their default size of 200 (example values used here):

suhosin.post.max_vars = "4096"
suhosin.request.max_vars = "4096"

The value needs to be on the order of (blocks * modules * 5) + 6 if all blocks are included in all modules.

I'm sorry - I'm not sure that I understood that ... last sentence up above. I didn't follow the equation ... could you explain a little bit more please?


alyssa's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
[ Linux / Apache 2.2.8 / MySQL 5.0.45 / PHP 5.2.6 / CPG 8.2b - 9.2.1.7]
Back to top
View user's profile
alyssa
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Nov 15, 2004
Posts: 773

PostPosted: Sun Jun 15, 2008 7:22 am
Post subject: Re: 9.1.2.6

I'm not finding suhosin.post.max_var in the php.ini file either. Sad

Unless it is this:

; Maximum size of POST data that PHP will accept.
post_max_size = 8M


alyssa's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
[ Linux / Apache 2.2.8 / MySQL 5.0.45 / PHP 5.2.6 / CPG 8.2b - 9.2.1.7]
Back to top
View user's profile
NanoCaiordo
Developer
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Sun Jun 15, 2008 12:40 pm
Post subject: Re: 9.1.2.6

Infact is not in php.ini but in suhosin config file.

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
mixed
Back to top
View user's profile Visit poster's website Photo Gallery
alyssa
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Nov 15, 2004
Posts: 773

PostPosted: Thu Jun 19, 2008 12:51 am
Post subject: Re: 9.1.2.6

What is the actual name of the file so I could do a find file search on it?

I'm still learning, and not sure where the file would be located and will need to do a search on the server for it.


alyssa's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
[ Linux / Apache 2.2.8 / MySQL 5.0.45 / PHP 5.2.6 / CPG 8.2b - 9.2.1.7]
Back to top
View user's profile
NanoCaiordo
Developer
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Thu Jun 19, 2008 8:35 am
Post subject: Re: 9.1.2.6

Sorry my mistake ... it should be in your php.ini, sorry again.

www.hardened-php.net/s...ation.html

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
mixed
Back to top
View user's profile Visit poster's website Photo Gallery
alyssa
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Nov 15, 2004
Posts: 773

PostPosted: Thu Jun 19, 2008 9:49 am
Post subject: Re: 9.1.2.6

Okay. So I opened *every* php.ini file on my server. I did a search on all of them for suhosin ... and the ONLY thing that had suhosin as a part of it was this:

Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
extension = "suhosin.so"

I went into the suhosin.so file and it was nothing but gibberish.

So not sure where to find this as there is no instance of suhosin in any of my php.ini files except the above.

Are you *sure* that is the right file to edit? I really need to fix this evidently, and have been struggling very hard to find it.


alyssa's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
[ Linux / Apache 2.2.8 / MySQL 5.0.45 / PHP 5.2.6 / CPG 8.2b - 9.2.1.7]
Back to top
View user's profile
NanoCaiordo
Developer
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Thu Jun 19, 2008 10:17 am
Post subject: Re: 9.1.2.6

What you can do is

go to admin.php?op=info and look for "Loaded Configuration File" .... see how it goes.

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
mixed
Back to top
View user's profile Visit poster's website Photo Gallery
darkgrue
Developer
Developer

Offline Offline
Joined: Apr 20, 2004
Posts: 542
Location: Lancaster, CA
PostPosted: Thu Jun 19, 2008 3:38 pm
Post subject: Re: 9.1.2.6

alyssa wrote:
darkgrue wrote:

Two settings have to be changed in php.ini from their default size of 200 (example values used here):

suhosin.post.max_vars = "4096"
suhosin.request.max_vars = "4096"

The value needs to be on the order of (blocks * modules * 5) + 6 if all blocks are included in all modules.

I'm sorry - I'm not sure that I understood that ... last sentence up above. I didn't follow the equation ... could you explain a little bit more please?

In your php.ini file, you need to add those two configuration lines for suhosin. Instead of 4096, you need to pick a value that is equal to or larger than the number of blocks you have, times the number of modules you have times five, and add 6 more to that. That covers the memory usage for the worst-case situation.

So, if you have 10 blocks and 12 modules, it would be:

(10 * 12 * 5 ) + 6 = 606

and you would put in your php.ini:

suhosin.post.max_vars = "606"
suhosin.request.max_vars = "606"

(I'd probably round the value up to the nearest power of two though.)

alyssa wrote:
Okay. So I opened *every* php.ini file on my server. I did a search on all of them for suhosin ... and the ONLY thing that had suhosin as a part of it was this:

Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
extension = "suhosin.so"

That's all that shows up in php.ini if you're loading suhosin. Installing suhosin does not add to the php.ini file all the possible suhosin variables, you have to edit it yourself and add them as appropriate.

alyssa wrote:
I went into the suhosin.so file and it was nothing but gibberish.

suhosin.so is a binary file, it's not human-readable. There's no configuration section. All the suhosin configuration is done in php.ini.

_________________
It is pitch black. You are likely to be eaten by a grue.

darkgrue's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Ubuntu 11.04, Atom D525/Apache 2.2.17/MySQL 5.1.54/PHP 5.3.5/Dragonfly 10.0.04 CVS
Back to top
View user's profile Visit poster's website
alyssa
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Nov 15, 2004
Posts: 773

PostPosted: Fri Jun 20, 2008 4:37 am
Post subject: Re: 9.1.2.6

Ahhhhh thank you SO much!!!

That fully spelled it out for me the clueless one!!

Does it matter *where* the code sits in the php.ini file? Or will any old place do?


alyssa's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
[ Linux / Apache 2.2.8 / MySQL 5.0.45 / PHP 5.2.6 / CPG 8.2b - 9.2.1.7]
Back to top
View user's profile
alyssa
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Nov 15, 2004
Posts: 773

PostPosted: Fri Jun 20, 2008 4:48 am
Post subject: Re: 9.1.2.6

And ahhh is it bad if that number is rather huge?

I have like a site with 57 mods and about 25 blocks .... lol ... so will having a large number there impact the server or site in a negative way?


alyssa's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
[ Linux / Apache 2.2.8 / MySQL 5.0.45 / PHP 5.2.6 / CPG 8.2b - 9.2.1.7]
Back to top
View user's profile
alyssa
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Nov 15, 2004
Posts: 773

PostPosted: Fri Jun 20, 2008 5:42 am
Post subject: Re: 9.1.2.6

Hmmm - I added it under the suhosin.so part in the php.ini file in the /usr/lib/ directory and nothing changed.

Do I need to add it to all files named php.ini?


alyssa's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
[ Linux / Apache 2.2.8 / MySQL 5.0.45 / PHP 5.2.6 / CPG 8.2b - 9.2.1.7]
Back to top
View user's profile
darkgrue
Developer
Developer

Offline Offline
Joined: Apr 20, 2004
Posts: 542
Location: Lancaster, CA
PostPosted: Fri Jun 20, 2008 7:41 am
Post subject: Re: 9.1.2.6

alyssa wrote:
Does it matter *where* the code sits in the php.ini file? Or will any old place do?

So long as the syntax is correct, placement doesn't matter. Some php.ini files are divided up into sections with comments and such, but that's really only for reasons of readability.

alyssa wrote:
And ahhh is it bad if that number is rather huge?

I have like a site with 57 mods and about 25 blocks .... lol ... so will having a large number there impact the server or site in a negative way?

No, this just sets the upper limit on how many variables can be defined. It doesn't pre-allocate them or cause additional memory to be consumed.

alyssa wrote:
Hmmm - I added it under the suhosin.so part in the php.ini file in the /usr/lib/ directory and nothing changed.

In general, you need to restart your web server for changes to the PHP options to take effect.

alyssa wrote:
Do I need to add it to all files named php.ini?

There should only be one php.ini file. Where it is matters, as there are precedence rules and such (PHP looks for its configuration in certain places first, the location varies by platform).

You can find the location of the active php.ini files by going to "Administration Menu > > System Info > > General" in the Dragonfly administration panel and looking for the line that says "Loaded Configuration File". This will be the full file path to the running configuration file (in my case that file is "/usr/local/bin/php.ini"). That will be the file you want to edit.

Again, remember you will need to restart your web server after editing the php.ini file.

To check that your changes have taken effect, go to "Administration Menu > > System Info > > PHP Modules" in the Dragonfly administration panel, and look for the lines "suhosin.post.max_vars" and "suhosin.request.max_vars" (you'll see them in a section labeled "suhosin", along with the Suhosin logo) and make sure that the "Local Value" column reflects the number you set each to.

_________________
It is pitch black. You are likely to be eaten by a grue.

darkgrue's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Ubuntu 11.04, Atom D525/Apache 2.2.17/MySQL 5.1.54/PHP 5.3.5/Dragonfly 10.0.04 CVS
Back to top
View user's profile Visit poster's website
alyssa
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Nov 15, 2004
Posts: 773

PostPosted: Fri Jun 27, 2008 8:46 am
Post subject: Re: 9.1.2.6

darkgrue wrote:

There should only be one php.ini file. Where it is matters, as there are precedence rules and such (PHP looks for its configuration in certain places first, the location varies by platform).

You can find the location of the active php.ini files by going to "Administration Menu > > System Info > > General" in the Dragonfly administration panel and looking for the line that says "Loaded Configuration File". This will be the full file path to the running configuration file (in my case that file is "/usr/local/bin/php.ini"). That will be the file you want to edit.

I do not have that there. in the "Administration Menu > > System Info > > General" tab, it only says this:

Administration Menu › System Info › General

General

Setting Value
CMS Version 9.2.1
PHP Version 5.2.6
MySQL Version 5.0.51a-community (client: 5.0.51a)
CMS path /home/domainuser/public_html/
Core path /home/domainuser/public_html/includes/
Session save_path /home/domainuser/public_html/phpsessions/
Process Owner nobody (77)
File Owner domainuser (35130)
Group 35130

That is all it says, there is nothing that says: "Loaded Configuration File". Sad

darkgrue wrote:

Again, remember you will need to restart your web server after editing the php.ini file.

To check that your changes have taken effect, go to "Administration Menu > > System Info > > PHP Modules" in the Dragonfly administration panel, and look for the lines "suhosin.post.max_vars" and "suhosin.request.max_vars" (you'll see them in a section labeled "suhosin", along with the Suhosin logo) and make sure that the "Local Value" column reflects the number you set each to.

And there is NOTHING in that tab. These are ALL totally empty:

PHP Core, PHP Environment, PHP Modules, and PHP Variables

Maybe THAT is some of my issues???

Why would that be empty?


alyssa's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
[ Linux / Apache 2.2.8 / MySQL 5.0.45 / PHP 5.2.6 / CPG 8.2b - 9.2.1.7]
Back to top
View user's profile
NanoCaiordo
Developer
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Fri Jun 27, 2008 10:01 am
Post subject: Re: 9.1.2.6

If these tabs are totally empty then phpinfo() is within the restricted functions ... try to create your own /home/user/publc_html/php.ini and add suhosin settings in there looks like you are going to have many chances to be more lucky doing this way.

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
mixed
Back to top
View user's profile Visit poster's website Photo Gallery
alyssa
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Nov 15, 2004
Posts: 773

PostPosted: Fri Jun 27, 2008 10:35 am
Post subject: Re: 9.1.2.6

What else would need to be in that php.ini file?

Just the suhosin ... or will I need to copy the entire php.ini file?

And how can I find out which php.ini file to use since I have several on my server?


alyssa's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
[ Linux / Apache 2.2.8 / MySQL 5.0.45 / PHP 5.2.6 / CPG 8.2b - 9.2.1.7]
Back to top
View user's profile
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index ⇒  Server Chat
Page 1 of 6
All times are GMT
Go to page 1, 2, 3, 4, 5, 6  Next



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

read more...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy