Mobile app version of vmapp.org
Login or Join
Jennifer507

: How to set suhosin.post.max_vars in a htaccess file 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

@Jennifer507

Posted in: #Htaccess

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?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Jennifer507

3 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

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.

10% popularity Vote Up Vote Down


 

@Debbie626

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, www.mattzuba.com/2011/04/suhosins-suhosin-perdir-directive/#more-153

10% popularity Vote Up Vote Down


 

@Looi9037786

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: 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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme