Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does $_POST have a size limit? [duplicate]

Tags:

php

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?

like image 261
Anonymous Avatar asked Sep 23 '11 14:09

Anonymous


2 Answers

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

like image 181
knittl Avatar answered Oct 07 '22 05:10

knittl


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")
like image 24
Qpi Avatar answered Oct 07 '22 06:10

Qpi