Amar
Amar

Reputation: 11

PHP Cannot upload file larger than 40MB

On my site, I'm allowing file uploads. I've successfully uploaded a 40 MB file. But I've been trying to upload a file above 40 mb

In my php.ini, I have the following:

upload_max_filesize = 10G
post_max_size = 10G
max_execution_time = 60 
max_input_time = 10000 
memory_limit = -1

I work on window server. I tried a 100mb file. It failed every time.

Upvotes: 0

Views: 909

Answers (2)

Wilt
Wilt

Reputation: 44336

Are you using php > 5.1. The G modifier is available since PHP 5.1.0.

I think your php doesn't correctly parse the G you are using. Try:

upload_max_filesize = 10000M
post_max_size = 10000M

Are you sure you want to allow 10 gigabyte? Better to define something close to the max file size you are using. So if it is something like 40 megabyte use 50M.

Upvotes: 1

Pooja Bhagat
Pooja Bhagat

Reputation: 91

Instead of post_max_size = 10G Try this
upload_max_filesize = 40M

Don't use too big size 10G ,Try with 100M

Upvotes: 1

Related Questions