Problem with LoadVars.send()

Simple problem but potentially crippling…

I’m trying to send large amounts of POST data from my SWF to a PHP script using the send() method of the LoadVars object. When executing the script everytnig goes well (that is, my data successfully gets sent to the PHP script) except that after some arbitrary amount, the data gets cut off.

For example, if I send 200 characters, all characters will successfully be sent to the PHP script. However, if the number of characters bring sent from the SWF exceeds say, 500 characters, the PHP script will only recieve about 450 of them.

Initially I thought this might have something to do with the configuration of my Apache server but it would seem that by default, the maximum amount of POST data that Apache will process is set to unlimited.

My next thought was that Flash was sending data sing the GET method, which aparently caters to a maximum of 250 characters at once, but the documentation insists that the send() method uses the POST method unless otherwise directed. This is not to mention that I am in fact explicitly including the “POST” argument when calling the send() method.

As a final note, it seems strange that even though the documentation insists that send() uses the POST method to send data, the PHP $_POST array is empty when examined after data was sent from the SWF to the script. Very strange indeed…

So here I am now, looking for answers and it would seem that I can’t find any solid answers to this problem of mine. Any help/suggestions would be greatly appreciated.

Best,
Ptolemy

You could splice the data in half within Flash and send it as two variables and then put them back together in the PHP script…

Yeah I had considered doing that but the data I’m sending will most likely have to be split around ten or more times before everything gets sent. Seems inefficient but it surely would work.

Thanks :wink:
Ptolemy

I wish I had my good computer because I could help, but right now this POS I’m on is about as good as a 4 function calculator. I’m thinking that it is the only way, unfortunately. :frowning: Sorry I couldn’t help more…

It turns out that if you preview an SWF locally, POST data will be cut off if it exceeds a certain amount of data. If you upload the SWF to the server on which the PHP script lives however, you will be able to send as much (if not a far greater amount) POST data as you like.

So things, so far, are working perfectly :wink:

Ptolemy