Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to add this values to my htaccess:

suhosin.request.max_vars = 8000
suhosin.post.max_vars = 8000

If I just add them like that I get an Internal Server Error

Which is the right way to include them?

enter image description here

share|improve this question
up vote 6 down vote accepted

The problem is that Apache doesn't know what to do with those values, hence the internal server error. You need to change the lines to the following:

php_value suhosin.post.max_vars 8000
php_value suhosin.request.max_vars 8000

The php_value causes the setting to be passed along to PHP. If you were setting boolean values (true/false), you would use php_flag instead. This will only work if you are running PHP as an Apache module. Otherwise you have to edit the php.ini file, which may not be an option.

For more info on using php_value and php_flag, see the relevant PHP documentation page: http://www.php.net/manual/en/configuration.changes.php


According to rhoyerboat's suggestion, the next issue you run into is that your PHP installation does not allow modification of the Suhosin Post variables on a per directory basis. You're going to have to get someone with access o the php.ini file to add suhosin.perdir = "p" to the file for the above .htaccess trick to work.

share|improve this answer
I added the lines as you said, now no error message is shown but phpinfo() show that the values hasn't change, suhosin.post.max_vars stil is 200 . Look this picture content.screencast.com/users/chefnelone/folders/Snagit/media/… – chefnelone May 17 '12 at 13:56
@chefnelone See updated answer. – Justin Pearce May 17 '12 at 17:52
working. thanks – chefnelone May 17 '12 at 22:10

Up-voting the last answer and also, the next problem is Suhosin's perdir directive.

perdir is visible in your phpinfo() output, but not in the Suhosin docs. This site explains pretty well, http://www.mattzuba.com/2011/04/suhosins-suhosin-perdir-directive/#more-153

share|improve this answer

Not all server types allow using php_flag and php_value and for those server types you would need to add these directives in a php.ini file instead.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.