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?
Webmasters Stack Exchange is a question and answer site for webmasters. It only takes a minute to sign up.
Sign up to join this communityThe 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
Edit:
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.
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
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.