user3487726
user3487726

Reputation: 11

uploading files greater than 8 mb in php

Warning: POST Content-Length of 11313557 bytes exceeds the limit of 8388608 bytes

I am getting this above warning. I searched around internet and I have also increased the the following limits in php.ini:

max_input_time = 600000;
max_execution_time = 60000000;
file_uploads = On;
upload_max_filesize = 1000M;
post_max_size = 1000M;
and also in mysql.ini file i have changed
max_allowed_packet = 100M;

but still I get the following warning. Files less than 8mb are easily uploaded but greater than 8mb pops up the above error message.

Upvotes: 1

Views: 3141

Answers (3)

Sulthan Allaudeen
Sulthan Allaudeen

Reputation: 11310

You need to set the value of upload_max_filesize and post_max_size in your php.ini :

; Maximum allowed size for uploaded files.
upload_max_filesize = 40M

; Must be greater than or equal to upload_max_filesize
post_max_size = 40M

And then you should stop your apache service and then start your apache.

In case of linux based systems

/opt/lampp/lampp stop

/opt/lampp/lampp start

In case of windows just stop and stop your apache or your xampp service.

Upvotes: 3

user2706194
user2706194

Reputation: 199

Add as first line at your process file set_time_limit(0);

Upvotes: 0

Nauphal
Nauphal

Reputation: 6182

Check the phpinfo page and see you have edited the correct configuration file. Loaded configuration file can be found in phpinfo page under Loaded Configuration File

Upvotes: 0

Related Questions