variables from Flash aren't recognized on XP machine

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
verabug
Forum Newbie
Posts: 16
Joined: Tue Jun 11, 2002 7:53 pm
Location: San Francisco, CA
Contact:

variables from Flash aren't recognized on XP machine

Post 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:
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
User avatar
verabug
Forum Newbie
Posts: 16
Joined: Tue Jun 11, 2002 7:53 pm
Location: San Francisco, CA
Contact:

Post 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!
Post Reply