Submitted by paulfromsurrey on Mon, 07/14/2014 - 20:45 Pro Licensee
I like to know where in virtualmin i can adjust the value of "max_input_vars" for php
Status:
Active
I like to know where in virtualmin i can adjust the value of "max_input_vars" for php
Comments
Submitted by andreychek on Mon, 07/14/2014 - 21:37 Comment #1
Howdy -- you can set
max_input_vars
by going into Services -> PHP5 Configuration -> Edit Configuration Manually, and there you will see your entire php.ini file. You can either edit the existing setting there, or if it doesn't exist, you could add it to your php.ini file.Submitted by paulfromsurrey on Mon, 07/14/2014 - 21:48 Pro Licensee Comment #2
where i can add this line
please advice
max_input_vars=10,000
or
ini_set("max_input_vars",10000)
Submitted by andreychek on Mon, 07/14/2014 - 21:46 Comment #3
You can add that anywhere you want in the file; it doesn't matter what order those parameters appear in.
Submitted by paulfromsurrey on Mon, 07/14/2014 - 21:52 Pro Licensee Comment #4
which option is right option
1>
ini_set("max_input_vars",10000
2>
max_input_vars=10,000
Submitted by andreychek on Mon, 07/14/2014 - 22:15 Comment #5
You might wish to try something like this:
max_input_vars=10000
I don't recall if it accepts a comma or not; but it will definitely work without one :-)
For those facing the same challenge. Which resolution option you need to choose depend on which PHP script execution mode you are presently using. Either FCGId or FPM (PHP-FPM). Find the resolution steps in my other comment at https://forum.virtualmin.com/t/changed-max-input-vars-but-no-effect/58225/7
Submitted by adamjedgar on Fri, 03/29/2019 - 19:08 Pro Licensee Comment #7
this does not work when running php-fpm. I went to virtualmin>services>php-fpm configuration>Edit configuration manually
and added to above line quoted...it took my entire webmin/virtualmin server offline...none of the php dependant website remained functional. Poor advice that is not spelled out or updated for current versions!!!
Hello @adamjedgar :) Thanks for your contributions to Virtualmin
The steps above are for FCGId mode. Notice that those comments above were posted years ago. Back then FCGId was the most frequently use PHP script execution mode. And FPM was not yet fully supported by Virtualmin. In other words, those steps above implies that they are for FCGId not for FPM. If you use FPM (PHP-FPM) those steps would likely not work.
The steps for FPM are at https://forum.virtualmin.com/t/changed-max-input-vars-but-no-effect/58225/7
This is a note to myself, today I updated my comment #6 above