Wasim A.
Wasim A.

Reputation: 9890

PHP upload not working due to size limitation

my php.ini values

upload_max_size = 14000M
post_max_size = 14000M

if i increase value more than 14000M, $_POST can't be accessed and using that value i can upload a file of 1.5GB only and can't upload a file of 2.14GB.

Here i have three questions

  1. What should i do so $_POST array also keep in working and i can also upload a file of 2.14 GB.
  2. Why $_POST is not working when i exceed value more than 14000M
  3. 14000M should mean 14GB, isn't so? if so then why i can't upload file of 2.14GB

Upvotes: 4

Views: 3175

Answers (4)

Wasim A.
Wasim A.

Reputation: 9890

i found answer to my question after 2 days work.
This is a bug in PHP which allow us to put *_max_size = 14000M and don't allow us to upload a file of 14000MB.

Reference https://bugs.php.net/bug.php?id=35578

We can't upload file for more than 2047MB, so following values are meaning less

upload_max_size = 14000M
post_max_size = 14000M

and should be converted to its maximum value like

upload_max_size = 2047M
post_max_size = 2047M

So now you can upload about 1.99GB File

Upvotes: 2

Tomas
Tomas

Reputation: 59455

There are much more limitations and pitfalls you have to check for, see oficial PHP documentation: http://www.php.net/manual/en/features.file-upload.common-pitfalls.php

Anyway, note that the 2G is also a limit of signed 32bit integer! So this problem might rise from some other limits unrelated to upload itself. Also, what is the maximum file size on the server filesystem? 2G is a limit on some systems.

Upvotes: 0

Shawn Northrop
Shawn Northrop

Reputation: 6016

I have had luck using G (Gigs) in my php.ini file:

upload_max_size = 3G

post_max_size = 3G

Not sure if this will help with the $_POST issue.

Upvotes: 0

safarov
safarov

Reputation: 7804

THere is no only upload_max_size and post_max_size that affect on file upload. Check this link

The most important is memory_limit. when you tring to upload big file, php run out memory

Upvotes: 0

Related Questions