How do I increase my max PHP variables?

Linode Staff

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?

1 Reply

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 max_input_vars

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct