tags:

views:

330

answers:

2

I am developing a tool where lots of data (>1MB of data) with lots of lines can be copied and pasted into a textarea. When I submit the form it just shows a blank screen. Nothing happens. Is there a way to process large data submitted by a form with PHP like in chunks and pieces? What are the best practices do handle large amount of data in a web form?

Thanks for you help!!

+1  A: 

Check the post_max_size in php.ini. I've never had any issues with uploading post data to a php script.

Are you running any functions on the data? Like stripslashes, htmlentities?

Try adding

enctype="multipart/form-data"

To your form.

And which PHP version do you have? Please refer to the following bug report on PHP.net: http://bugs.php.net/bug.php?id=22427

alexn
A: 

First off you need to raise the default amount that PHP can handle from 8MB to whatever you think you will need, secondly how to handle that amount of data directly depends on what you actually want to do with it, you would obviously need to clean up malicious code.

Marc Towler
Thanks, that was it. I had to increase the memory_limit from 8M to 20M and now it works...