简体   繁体   中英

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.

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.

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

在进程文件set_time_limit(0)中添加第一行;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM