Home › Forums › Backend Issues (wp-admin) › PHP: Input variables exceeded 1000
While trying to edit a field group, I noticed that my changes were not being saved. When I looked at the web server logs I saw entries like this…
AH01071: Got error 'PHP message: PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0\n'
So I enabled the developer tools on my web browser and examined the contents of the post. Sure enough, there was easily over 1000 variables being posted (it is a field group with a lot of stuff in it).
Server setup:
Conditions causing the bug:
Temporary work-around:
I bumped the php.ini variable ‘max_input_vars’ up to 2000, restarted apache, reconstructed the field group and was able to save it. So too many form variables being submitted at once is definitely causing the problem. Luckily, everything that used that field group was restored to normal operation after reconstructing the field group. Then I returned ‘max_input_vars’ to its default value of 1000 and restarted apache again to prevent attackers from trying to abuse GET and POST requests.
Suggested solution:
It is my understanding that WordPress is moving toward using its REST-API for all screens in the admin area. Maybe now is a good time to start converting ACF to submit all data from the field group editor as a single JSON data string. This would avoid triggering the default 1000 input variable setting on apache.
As far as I know the only solution currently is to increase max_input_vars and leave it.
The developer may focus on this in the future, but I don’t have this information. The best way for you to get his attention is here https://www.advancedcustomfields.com/contact/
Yes, I figured out later that the developers don’t really follow this forum, so I filled out a trouble ticket with my suggestion solution. The answer i got back was that the person answering the trouble ticket would pass my JSON data idea on to the developers.
Hope this helps others, but for every WP site I set max_input_vars to 5000. Since then I have run dozens of sites and some with massive amounts of repeaters and other fields. So far I have not run into this issue again.
You can do this with Apache or Nginx (Whatever web server you are using) or PHP.ini.
The developer took my advice. All versions since 5.0 no longer have this problem.
You can change your max_input_vars setting back to the default value of 1000, and ACF will work fine with large field sets.
The topic ‘PHP: Input variables exceeded 1000’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.