Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change max_input_vars

Tags:

php

xampp

I have a form with over 1000 inputs, it shows warning below:

Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0

I have changed max_input_vars to more than 1500 in php.ini file but it does not take effect and shows the same error.

My project details:

  • Server: Localhost XAMP
  • PHP version: 5.5.15
  • System OS: windows 7

How can I clear this warning?

like image 624
Sakthivel Avatar asked Sep 16 '15 07:09

Sakthivel


2 Answers

ASH's suggested

ini_set('max_input_vars','2000' );

but this never work with ini_set. You need to set it with php.ini or .htaccess file only.

like image 60
Jayesh Dhudashia Avatar answered Nov 14 '22 22:11

Jayesh Dhudashia


Add below code in your .htaccess file

php_value max_input_vars 2000

you can change value of 2000 to as per your need

like image 31
Hitesh Tripathi Avatar answered Nov 14 '22 22:11

Hitesh Tripathi