Page 1 of 1

variables from Flash aren't recognized on XP machine

Posted: Tue Jun 11, 2002 7:53 pm
by verabug
I'm trying to send some variables from Flash MX to PHP and then have PHP write an XML document.
I've tried both the ActionScript function loadVariables and the ActionScript object LoadVars. One of the names of the variables is "firstOne".
Here is part of my PHP file

Code: Select all

if ($firstOne != null) {
	$stuff = '<?xml version="1.0" encoding="UTF-8"?>'."\r\n";
	// add all kinds of more stuff to $stuff;
     // then write the whole string to a text file
	$fp = fopen("eq_test.xml", "w");
	fputs($fp, $stuff);
	fclose($fp);

	// inform Flash of success
	print "&result=success&xml=$stuff";
&#125; else &#123;

	// inform Flash of failure
	print "&result=NoVariables";
&#125;
I have two computers. One has Windows XP, PHP version 4.2.0 and Apache version 1.3.24. On this one, PHP didn't get the variables I sent and generated the failure message.
The other computer has Windows 98, PHP version 4.0.6 and Apache version 1.3.20. On this one, the shuttling of variables worked fine. I also used to work on a Windows 2000 machine (I don't remember the PHP or Apache versions there) on which I never had any problems using the above methods.

What could be going on here? :roll:

Posted: Wed Jun 12, 2002 1:45 am
by twigletmac
Have you read the sticky post at the top of the forum? Based on the version numbers of PHP that you gave this might have something to do with it.

Mac

Posted: Wed Jun 12, 2002 8:58 am
by verabug
Thanks, twigletmac! I did actually read the sticky post but didn't realize it applied to my problem. Now that you mention it, it dawns on me that the missing variables would have been activated with register_globals in previous versions. I'll look into that. Thanks!