1

My php version is 5.4.16

I have a form with 2500 fields. That sounds weird, but actually I have an excel sheet. I read the sheet and display all data in an HTML table whose each cell has a hidden field so that I would be able to post all the data and do further.

I found How to increase maximum POST variable in PHP? so I need to change max_input_vars but could not find it.

Issue: I need to change max_input_vars? But i am unable to find it in php.ini

Please help!!!

4
  • Have you tried ini_set() or using .htaccess? Commented Jul 5, 2015 at 14:24
  • Have you tried search tools - Ctrl+F, F3, find command? Commented Jul 5, 2015 at 14:25
  • @Zudo I read it on another post as Ricardo said in the answer it cannot be on run time using ini_set it is to processed by the engine before the script starts. Commented Jul 5, 2015 at 14:51
  • @u_mulder Obviously i tried :) Commented Jul 5, 2015 at 14:52

1 Answer 1

3

If you are unable to find it, just add it yourself ;) If it's not there in the configuration file (which is strange) it will assume the default value of 1000.

max_input_vars = 3000

This value is not possible to set at runtime using ini_set because in the documentation it's specified as PHP_INI_PERDIR which makes sense because the request variables have to be processed by the PHP engine before your script starts.

You can set it in .htaccess as well if you want to make this more specific to this project without affecting other projects in the same server.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks a million. Its was not there, but i added as you suggested and i worked for me. I set it to 100,000 !!! :)
You should be more sensible in the value you use for max_input_vars. It may turn into a security problem if an attacker tries to flood you with info (you can confirm in the PHP documentation) :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.