I would like to send a ~10MB json data in a textarea named "data". If the data is 1-2KB, then it works perfectly. But with a large json, the $_POST['data']
is empty for some reason.
I can't upload the json otherwise, because it is generated clientside, it's not a file.
I've tried this code, but still not working:
form.setAttribute('enctype', 'multipart/form-data');
Edit
With this settings it is still not working:
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
Edit2
If I switch from php 5.4 to 5.6, then I get an 500 error page, with no details written on the screen.
You need to change post_max_size
to enough (20MB) in the php.ini
file.
By default, PHP
permits a maximum file upload of 2MB.
Two PHP configuration options control the maximum upload size: upload_max_filesize
and post_max_size
. Both can be set to, say, 20M
for 20 megabyte file sizes or higher if required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With