Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

I am getting this error when trying to upload an import on WordPress on my XAMPP local dev environment:

Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

I changed the upload_max_filesize from 2M to 1000M, but that didn't seem to do anything.

Any ideas?

like image 651
novicePrgrmr Avatar asked Oct 20 '22 13:10

novicePrgrmr


4 Answers

8388608 bytes is 8M, the default limit in PHP. Update your post_max_size in php.ini to a larger value.

upload_max_filesize sets the max file size that a user can upload while post_max_size sets the maximum amount of data that can be sent via a POST in a form.

So you can set upload_max_filesize to 1 meg, which will mean that the biggest single file a user can upload is 1 megabyte, but they could upload 5 of them at once if the post_max_size was set to 5.

Changes will take effect after a restart of the server.

like image 422
Fluffeh Avatar answered Oct 24 '22 13:10

Fluffeh


Just set these in php.ini:

upload_max_filesize = 1000M;
post_max_size = 1000M;
like image 75
Altab Hossen Avatar answered Oct 24 '22 13:10

Altab Hossen


1. First u will find the php.ini file.

u can find php.ini file from this path. C:\xampp\php or from xampp folder.

2. Now open php.ini file and change the following:

1. post-max-size (change 8M to 800M).

2. upload-max-filesize (change 2M to 2000M).

3. Now stop the Apache server and MySQL.

4. Now restart Apache server and MySQL.

It worked fine after that.

Enjoy ur working now :)

like image 33
Muhammad Tahseen Ur Rehman Avatar answered Oct 24 '22 12:10

Muhammad Tahseen Ur Rehman


That's an 8MB post_max_size error.

Set it to a value you're comfortable with.

like image 22
Mihai Stancu Avatar answered Oct 24 '22 13:10

Mihai Stancu