-1

I am trying to upload Avada theme on my localhost server Xampp. But I am facing this error " Warning: POST Content-Length of 45168105 bytes exceeds the limit of 8388608 bytes in Unknown on line 0"

I know that this is because of upload_max_filesize but I have change it in php.ini but still getting the error. Don't know why. Need some answers. Already googled and tried every thing

upload_max_filesize=1000M
post_max_size=20M
Raghbendra Nayak
  • 1,606
  • 3
  • 22
  • 47
Devilism
  • 147
  • 2
  • 5
  • 20

3 Answers3

3

8388608 bytes is 8M, the default limit in PHP. So i suggest you to set your php.ini as below

php_value post_max_size 250M
php_value upload_max_filesize 250M
php_value max_execution_time 600000
php_value max_input_time 600000
php_value memory_limit 250M

Note: make sure your restart your Apache server after making them.

Original :https://stackoverflow.com/a/6279945/2384642

Community
  • 1
  • 1
Shiv Singh
  • 6,939
  • 3
  • 40
  • 50
1

Your problem is that you didn't change post_max_size to equal 1000M. upload_max_filesize is to accept uploading files over 1000Mb, but to do that you need to upload them (via post) so, you are limiting the post size to 20Mb.

Change post_max_size=20M to post_max_size=1000M and remember you can use K for Kilobyte, M for Megabyte and G for Gigabyte, so you could write 1G insted of 1000M (1024M).

Here official PHP Documentation.

Note: PHP allows shortcuts for byte values, including K (kilo), M (mega) and G (giga). PHP will do the conversions automatically if you use any of these. Be careful not to exceed the 32 bit signed integer limit (if you're using 32bit versions) as it will cause your script to fail.

Post duplicated.

Community
  • 1
  • 1
matiaslauriti
  • 7,065
  • 4
  • 31
  • 43
0

Edit the .htaccess file instead of your php.ini file. Like this:-

php_value upload_max_filesize 50M
php_value post_max_size 50M
php_value max_execution_time 500
php_value max_input_time 500
Enkum
  • 635
  • 8
  • 22