7

Possible Duplicate:
What is the size limit of a post request?

Does $_POST when used in conjunction with forms in PHP have a size limit? Obviously there must be some restrictions with $_GET seeing as most browsers will start to complain at ~250 characters (or something like that) and data could be lost, obviously this restraint doesn't apply to $_POST.

I could test it myself but thought it might be quicker to simply ask here. If I had a simple form with a textarea, how much data could I enter before I ran into problems?

Community
  • 1
  • 1
Anonymous
  • 6,181
  • 7
  • 45
  • 72
  • 7
    you could google `post size limit` and it would be even faster – Your Common Sense Sep 23 '11 at 14:04
  • 4
    @Col. Shrapnel as a lonewolf developer I thought I'd opt for what I consider to be my daily dose of human interaction via the stackexchange. :D – Anonymous Sep 23 '11 at 14:13
  • 1
    @Downvoters ...a bit over the top, it's a perfectly valid question that hasn't been asked that many times (though now I look, granted, a few). – Anonymous Sep 23 '11 at 14:15
  • Don't you have a bit more intelligent question that require some discussion and cannot be solved by five-second googling for the socialization? Your excuse seems weak to me. I'd say it's mere laziness – Your Common Sense Sep 23 '11 at 15:50
  • Maybe so, but I think I'm allowed the odd spate of laziness given the extensive idiot-proofing that is involved in programming. :) – Anonymous Sep 23 '11 at 15:59
  • 2
    @YourCommonSense Oddly enough, this is the first result when I Google "$_POST limitations".... – Kenny Johnson Jun 20 '13 at 15:37

6 Answers6

10

That depends on the value of the PHP configuration directive POST_MAX_SIZE which is usually set to 8 MB (~8 million characters).

knittl
  • 246,190
  • 53
  • 318
  • 364
9

Yes it has limitation, you can set the limit from several place:

1., in php.ini

post_max_size="8M"

2., from the .htaccess file, if you have

php_value post_max_size 8M 

3., from php side,

ini_set('post_max_size',"8M")
Qpi
  • 394
  • 1
  • 3
  • 8
6

yes,

you can change limit from php.ini "post_max_size"

Nimit Dudani
  • 4,840
  • 3
  • 31
  • 46
1

It's a PHP ini directive, post_max_size. It defaults to 8MB.

Alex Turpin
  • 46,743
  • 23
  • 113
  • 145
0

Yes. It's defined in the php.ini file.

Rijk
  • 11,032
  • 3
  • 30
  • 45
0

Yes the POST data is regulated by the post_max_size variable (default to 8M)

Mika Andrianarijaona
  • 1,619
  • 17
  • 29