Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Nov 2005
    Posts
    93
    Thanks
    5
    Thanked 0 Times in 0 Posts

    PHP does not allow all POST variables

    Hi,

    I have a form with 3000 fields, only the first 1000 variables are added to POST array and saved to the db.

    I checked the php.in file the post_max_vars setting is not found. However when i check the php_info page it shows post_max_vars=1000.

    How can i change this, since i dont have this directive in in the php.ini file

    Thanks

  • #2
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,486
    Thanks
    279
    Thanked 32 Times in 31 Posts
    you can try one of these two,

    try the php ini first, if that does not work (sometimes it happens)

    then do the htaccess method

    PHP Code:

    (php ini )

    post_max_size=20M 


    (or in htaccess

    php_value post_max_size 20M 

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,866
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    I have a form with 3000 fields,
    Have a look at http://stackoverflow.com/questions/9...ariable-in-php

    btw, why would you need that much input elements in a single form?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #4
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,486
    Thanks
    279
    Thanked 32 Times in 31 Posts
    LOL abduraooft yeah it does seem like alot huh, poss total overload. Maybe its the new NASA space station auto toilet with 3000 ways to flush your stuff lol, who knows....

  • #5
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    You can add it to the php.ini if it's not there:
    Code:
    ; PHP 5.3.9+
    max_input_vars=4000
    
    ; Suhosin
    suhosin.post.max_vars 4000
    suhosin.request.max_vars 4000
    After you have updated make sure you restart PHP and check your phpinfo() again.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •