I've got a virtual Windows XP machine running Apache 2.2 that is hosting my Flex app. I'm trying to keep the Apache settings as "normal" as possible and not change too many things since I don't know on what server my app will ultimately end up. So, I don't really want to rock the boat and make the server admin add an option for me to have some of my scripts (and the xml files they write) executed outside the cgi-bin. However, this is creating a problem.
<s:HTTPService id="service" showBusyCursor="true" url="data/TestCase.xml" />
THIS DOES NOT
<s:HTTPService id="service" showBusyCursor="true" url="cgi-bin/TestCase.xml" />
(I have a copy of the file in both locations on my machine. Scripts also fail to execute this way.)
In Example A, the file is located here: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FlexProject\data\TestCase.xml
In Example B, the file is located here: C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin\TestCase.xml
Is this a cross-domain issue even though I'm accessing everything through //localhost?
Here's my cross-domain file:
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<site-control permitted-cross-domain-policies="all" />
<allow-access-from domain="localhost" to-ports="*" secure="true"/>
Do I need to include localhost/cgi-bin? (That would seem redundant.)
Is there anything else that may be causing this problem? Anyone know of a fix?
UPDATE - It was an Apache problem!
I restarted Apache after my scripts failed to execute in my browser (not through Flash). They *were* working fine about 3 hours ago, but stopped working... so I figured it must have been something in my Flex project that *I* changed. However, the scripts started working again after restarting the server. (Which I have had to do several times now. I'm not a server person, so I'm not sure why.)
As for the XML, writing it to the data folder inside src (rather than writing inside the cgi-bin) works just fine.