Suhosin – Changing config values

Suhosin, the hardened php project.  If you are having some troubles running some scripts after you’ve installed, you will have to change some of the configuration values.  There are three ways of doing this, however, I’ll only touch on two of them.  Both require you to have root access to the server.  If you want to change values globally (for all sites on the server), then you would add the config changes to the end of your php.ini file.  For example: = 2048
suhosin.request.max_vars = 2048

Now, I chose these because, if you run a vbulletin forum, your likely going to want to increase these from the default values.  If this is what you want to use, restart httpd and your done.  Feel free to check the phpinfo to check your settings.

The second way, is to allow users to use .htaccess files to change values, similar to changing your php configuration values (php_value).  In order to allow users to change setting through .htaccess, you need to add this line into your php.ini file:

suhosin.perdir = “p”

Once saved, and httpd restarted, you should be able to create per directory changes for suhosin.  For example, your .htaccess file would look like this:

php_value 2048
php_value suhosin.request.max_vars 2048

Once again, feel free to pull up your valuable phpinfo page to see if your changes have taken effect.