Page 1 of 1

How to increase php_input_vars

Posted: Mon Jul 23, 2012 7:16 am
by jeffryf
I'm running a Wordpress site. I use a plugin that displays tables (http://www.yourownhealthandfitness.org/?page_id=71 is one of them). What's happened recently is that settings for the tables don't persist. I've been in dialogue with the developer. In similar cases, people have increased php_input_vars.

I'm unable to do it. I've added php_value max_input_vars 3000 to my htaccess file without success (meaning that when I run phpinfo.php I'm told the local value is 1000). I created a php.ini file in my root with the line max_input_vars = 3000 with the same result.

I did this latter based on a post that said the htaccess method wouldn't work when PHP is set up through as a CGI script, which my site is (Wordpress requires PHP5, so I have Action php-cgi /cgi-bin/php53 AddHandler php-cgi .php in my htaccess.

This probably sounds like a know what I'm taking about, but I'm basically groping my way toward a solution.

Help appreciated.

Re: How to increase php_input_vars

Posted: Thu Jul 26, 2012 12:29 pm
by joemuller
Jeffry,

I think I may have found a solution for you.

First, because PHP is running as a CGI, the usual .htaccess php_value directives won't work.

Second, php.ini may work if you put it at the root of your web directory, but perhaps you want to just override a small set of variables. Luckily, you can do the same thing with a file called .user.ini. You can find the full description here, but in short, they have the same hierarchical behavior as .htaccess files.

I was able to drop a small test page into your directory along with a .user.ini file with the following:

Code: Select all

max_input_vars = 3000
Running phpinfo(INFO_CONFIGURATION) in any php file in the directory will give a local value that corresponds to the settings changed in the .user.ini file.

Please give this a shot and let me know if it works.

-- Joe @ Sonic.net System Operations

Re: How to increase php_input_vars

Posted: Thu Jul 26, 2012 1:42 pm
by jeffryf
We have a winner!

Thanks.

Re: How to increase php_input_vars

Posted: Thu Jan 16, 2014 3:21 am
by Guillaume
Hello, add the command
;How many GET / POST / COOKIE input variables May be accepted
then max_input_vars = 99999 just after max_input_nesting_level = 64 in the php.ini file because the . htaccess file if you have activated the url rewriting you erase the line max_input_vars = 99999 each time