Skip to main content
October 9, 2009
Question

LoadVars problems

  • October 9, 2009
  • 1 reply
  • 583 views

Hi

I am using sendAndLoad heavily in my fms3.5.2 application because it accesses an API on the webserver to execute commands. It calls a PHP file on the webserver which connects to a database, does some processing and returns XML output.

Now, LoadVars has been giving me problems for months now. I suspect it is the reason my application crashes intermittently.

Also, lately.. it takes about 2 minutes just for the sendAndLoad to reach the onData stage. I have no idea why. This is not a problem of the PHP taking long to display the XML because if I access the PHP directly using `links` linux command, then it returns practically immediately.

So any ideas as to alternatives to LoadVars or a fix?

    This topic has been closed for replies.

    1 reply

    October 9, 2009

    A good alternative... use AMFPHP and the NetServices class. Not only is it faster (NetServices sends/receives native AMF data), but you can send complex data types as well (like arrays and objects).

    That said, I've never had performance problems with LoadVars. Perhaps it's an issue with how you're using it? Posting your code would be helpful.