php - Why is _REQUEST["MAX_FILE_SIZE"] set to 2097152?
Get the solution ↓↓↓I have been following this very simple PHP upload script:
http://www.commentcamarche.net/faq/889-php-upload-de-fichiers
I did check that:
$ cat /etc/php5/apache2/php.ini | grep upload_max_filesize
upload_max_filesize = 2047M
and
$ cat /etc/php5/apache2/php.ini | grep post_max_size
post_max_size = 2146445312 ; 2047M + 10K
However nomatter what I set in my form the hard limit is always (using phpinfo() to display info):
Core
PHP Version 5.3.3-7+squeeze14
post_max_size 2146445312 2146445312
upload_max_filesize 2047M 2047M
PHP Variables
_REQUEST["MAX_FILE_SIZE"] 2097152
_POST["MAX_FILE_SIZE"] 2097152
Where is this limit possible coming from ? All I need is a simple HTML form to send data, since my customer is not capable of my anonymous ftp upload.
For completeness here is what I use:
$ cat input.html
<form method="post" action="upload.php" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="2012345">
<input type="file" name="nom_du_fichier">
<input type="submit" value="Envoyer">
</form>
I even tried removing the field MAX_FILE_SIZE, it never change. I used the magic value 2012345 in the hope to see it appear in the output of phpinfo() but again with no luck so far...
Thanks !
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: illuminate\http\exceptions\posttoolargeexception
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.