How do I increase my max PHP variables?
We've hit the maximum PHP variable limit on our site. We're getting an error message that says
Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0
How can we increase the max PHP variables?
So in this case, you can resolve this by creating a new PHP directive that defines the maximum variables. This is accomplished by creating a file named
.user.ini on your web root directory. All you need to enter into the
.user.ini file is:
max_input_vars = 10000
Or whatever value you need. You can double check that this has worked properly by creating a PHP script that only contains the following line:
< ?php phpinfo(); ? >
(note that you will need to eliminate the space between the < and ? symbols)
When you request that file through your web browser you should see the new local value for variables with the heading