728x90

I'm using WAMP in my local machine, when a FORM(method="POST") with 2000 input fields is submitted I'm able to read only 1001 _POST variable. i.e With Netbeans debugger I can clearly see _POST size is always 1001 if there are more than 1001 input fields in the form.

I used this http://ideone.com/GAw14 java code to generate form with N input fields and tested.

The same is working fine in another machine(WAMP), where I can see all the POST variables.

Please help me to solve my problem.

    PHP 5.3.9 introduced the max_input_vars config option, which is defaulted to a value of 1000. Check out the Runtime Configuration section of the PHP manual. The default value and the change log are at the top of the page.

    The value can be changed by updating the server's php.ini, adding an .htaccess file, or adding a line to httpd.conf.

      If you are using Suhosin with Hardened PHP, you might be hitting a maximum variables limit that it imposes. In your php.ini, you can just add

      [suhosin]
      suhosin.request.max_vars = 1000
      suhosin.post.max_vars = 1000

      changing 1000 to whatever you want and restart your webserver.

      I ran into this on the Drupal Permissions page when there were a lot of modules installed with a large number of roles, which resulted in a ton of checkboxes. It would only save a certain number of them before anything after would just get ignored.

      It sounds like this is probably not your problem, but since it's fairly likely that someone in the future may stumble upon this when searching for something related I'll go ahead and throw this in since it took me ages to figure out when I was stumped.

        I solved my $_POST max inputs -problem by adding the following to php.ini:

        max_input_vars = 5000
        suhosin.request.max_vars = 5000
        suhosin.post.max_vars = 5000

        Note the suhosin.request.max_vars also.

          I solved this problem. Open the PHP.INI configuration file and add these lines

          [suhosin]

          suhosin.post.max_vars = 20000

          suhosin.request.max_vars = 20000

          I suspect the problem is with the amount of data coming with your POST request. There is no setting which limits the number of $_POST vars that can be set. However there is a memory limit for POST data which is 8MB by default.

          In your php.ini file try modifying the value of post_max_size and set it to a higher value. Don't forget to restart apache after the change is made.

            protected by Community Jul 12 '15 at 4:28

            Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count). 

            Would you like to answer one of these unanswered questions instead?

            Not the answer you're looking for? Browse other questions tagged    or ask your own question.


            + Recent posts