Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-16-2012, 07:44 AM   PM User | #1
coolguyraj
New Coder

 
Join Date: Nov 2005
Posts: 93
Thanks: 5
Thanked 0 Times in 0 Posts
coolguyraj is an unknown quantity at this point
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
coolguyraj is offline   Reply With Quote
Old 10-16-2012, 08:52 AM   PM User | #2
durangod
Senior Coder

 
Join Date: Nov 2010
Posts: 1,177
Thanks: 214
Thanked 31 Times in 30 Posts
durangod is on a distinguished road
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 
durangod is offline   Reply With Quote
Old 10-16-2012, 09:08 AM   PM User | #3
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
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?
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 10-16-2012, 09:11 AM   PM User | #4
durangod
Senior Coder

 
Join Date: Nov 2010
Posts: 1,177
Thanks: 214
Thanked 31 Times in 30 Posts
durangod is on a distinguished road
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....
durangod is offline   Reply With Quote
Old 10-17-2012, 01:32 AM   PM User | #5
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,602
Thanks: 2
Thanked 398 Times in 391 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
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.
Inigoesdr is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:25 PM.


Advertisement
Log in to turn off these ads.