Linking to PHP on an Amazon Linux Web Server

8 views
Skip to first unread message

Tony Molloy

unread,
Nov 9, 2014, 11:19:57 AM11/9/14
to scrip...@googlegroups.com
Hello,

I'm trying to put together a Stroop Task to administer in Qualtrics, but I'm not able to figure out how to get my .swf file to fully run.  I've had no issues compiling it and I'm able to partially run it on a standalone Flash Player as well as upload it to my server and play it in my web browser.

We've been trying to make it work for a while now, and at first we were actually able to make the file run all the way through when the .php was stored in a public Dropbox folder.  The issue though was that it still would not write to a .csv in that folder.

I thought a Linux web server would be a simpler, better choice than Dropbox and so I set one up via Amazon EC2.  I know that the files I've put on it are all accessible online.  When I compile the .swf file directing it to the .php on my server though, it stops running as soon as I get to the part where it would start collecting reaction time data.

Does this just mean it's unable to connect with the .php?  Is there some step I'm not taking to link them?  My .mxml, and .swf files are attached, any help would be much appreciated.

Thanks,
Tony
Stroop_Task.swf
Stroop_Task.mxml

Thomas Schubert

unread,
Nov 20, 2014, 8:53:54 AM11/20/14
to scrip...@googlegroups.com
Tony,

there are several confusing things here....


> We've been trying to make it work for a while now, and at first we
> were actually able to make the file run all the way through when the
> .php was stored in a public Dropbox folder. The issue though was that
> it still would not write to a .csv in that folder.
no, that cannot work, because you need a PHP server that handles the
.php programming. Serving the .swf file from a dropbox folder is fine,
but dropbox has no php server built in, and there is no way to put one
there. the php file needs to live on a web server that has PHP installed
and properly configured.

>
> I thought a Linux web server would be a simpler,
yes.
> better choice than Dropbox and so I set one up via Amazon EC2. I know
> that the files I've put on it are all accessible online.
ok
> When I compile the .swf file directing it to the .php on my server
> though, it stops running as soon as I get to the part where it would
> start collecting reaction time data.
that is surprising, because the .swf only accesses the php file in the
very end, when transmitting all the data. so I suspect that something
else went wrong in your file when you put in the php address. Otherwise
I would not know how that change could affect the running of the .swf at
such an early stage.

I looked at your file, but did not find an obvious error. I suggest you
start again with the version that worked when being served from the
dropbox, put that on the server without changing anything, and then test
from there.

hope it works out!
thomas

Tony Molloy

unread,
Nov 20, 2014, 9:29:13 AM11/20/14
to scrip...@googlegroups.com
Hi Thomas,

Thanks for the reply! We actually figured it out since I posted this, the problem seems to be that I was compiling my .swf file with scriptingrt034.swc.  Once I realized there was a newer one and downloaded version 0352 the .swf files started running all the way through, communicated with the php on my Linux server, and had no problem writing to my .csv on the same server.

One small difficulty we've still been having though- our goal is to use the .swf in a Qualtrics survey, and for some reason the HTML embedding code from the manual won't work with a link to the .swf from my web server.  I'm confused because it will play when I just go straight to it in my browser- 


We can get around the issue by putting the .swf into a Dropbox folder and linking it from there, but it would be nicer/simpler if we could have everything coming from the same place.

Here's the HTML code I put into my Qualtrics Text/Graphic object, any ideas?

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" height="450" id="HelloWorldFlash" width="1000">
<param name="quality" value="high" />
<param name="bgcolor" value="#000" />
<param name="allowScriptAccess" value="sameDomain" />
<embed align="middle" allowscriptaccess="sameDomain" bgcolor="#000" height="450" loop="false" name="flashlight" play="true" pluginspage="http://www.adobe.com/go/getflashplayer" quality="high" src="http://ec2-54-68-55-63.us-west-2.compute.amazonaws.com/StroopAmazon2.swf" type="application/x-shockwave-flash" width="1000">
</embed></object>

Thanks,
Tony

Thomas Schubert

unread,
Nov 20, 2014, 2:23:51 PM11/20/14
to scrip...@googlegroups.com



> Once I realized there was a newer one and downloaded version 0352 the .swf files started running all the way through, communicated with the php on my Linux server, and had no problem writing to my .csv on the same server.

great

>
> One small difficulty we've still been having though- our goal is to use the .swf in a Qualtrics survey, and for some reason the HTML embedding code from the manual won't work with a link to the .swf from my web server.

this probably happens because of security restrictions. the link on amazon is only http, but dropbox and qualtrics are https

t

Tony Molloy

unread,
Nov 21, 2014, 7:37:14 AM11/21/14
to scrip...@googlegroups.com
Ok that makes sense, I remember reading something about that on the scriptingrt website.  Using Dropbox is no problem.

Thanks and take care,
Tony
Reply all
Reply to author
Forward
0 new messages