CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   PHP does not allow all POST variables (http://www.codingforums.com/showthread.php?t=277141)

coolguyraj 10-16-2012 07:44 AM

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

durangod 10-16-2012 08:52 AM

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 


abduraooft 10-16-2012 09:08 AM

Quote:

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?

durangod 10-16-2012 09:11 AM

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.... :D

Inigoesdr 10-17-2012 01:32 AM

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.


All times are GMT +1. The time now is 11:50 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.