PDA

View Full Version : actionscripts tutorial not working for amfphp


SeanPaul72
03-03-2004, 01:24 PM
So I'm delving back into amfphp, and I'm reading the actionscript tuttorial buy Jesse Stratfiord.

I've downloaded the test files from the tutorial, and when I test talk.fla, I only get the folowing in my trace window:

Calling returnString
Calling returnNumber
Calling returnArray


when I should get the following

Calling returnString
Calling returnNumber
Calling returnArray
Got result "You said 'Flash Remoting is groovy' and I totally agree!" of type string
Got result "500" of type number
Got result "[object Object]" of type object which contained the following:
result: Your Object contained the value bar



What do you think the problem is?

thanks

SeanPaul72
03-03-2004, 01:44 PM
when I test in Flash's remote connection debugger
I get the folowing

Status (object #2)
.....code: "NetConnection.Connect.Failed"
.....level: "error"


so my connection is failing.
I've checked all my paths and they appear to be correct.
Do you think it is beecause I'm running the script from my desktop and therefore the php code doesn't get processed?

When I post the files on my server I get a blank page. I think because the code only does trace commands in the output window.

Can anyone enlighten me or confirm what I have said?

thanks

dbonneville
03-23-2004, 10:08 PM
I got exactly the same thing. Does anyone else use amfphp??

Doug

prt1
03-31-2004, 01:12 AM
I know it sounds stupid but are you running it from localhost, ie your web server, as it uses PHP it needs to run from localhost.
If you are running apache the directory is normally Program Fles/Apache/Htdocs
Try running the gateway file for the application directly from the Browser, if everything is OK it will return a blank page,ie http//localhost/folder/file.php

dbonneville
03-31-2004, 09:17 AM
I am using the browser correctly, accessing the page via the apache server. I get the same error as the other user above. I think something is wrong somewhere in the documentation for us both to get exactly the same error.

Doug

destr3
04-28-2004, 09:14 PM
You could be having a problem with your simple_gateway.php not getting the relative path right. instead of using just "services/" try using $_SERVER['DOCUMENT_ROOT'] instead:


<?php

include "../../flashservices/app/Gateway.php"; // or wherever your Gateway.php is

$gateway = new Gateway();
$fbaseClassPath = $_SERVER['DOCUMENT_ROOT'] . "/flashservices/services/";
$gateway->setBaseClassPath($fbaseClassPath);
$gateway->usePearSOAP(false); // I'm using nuSoap
$gateway->service();

?>

Smart K8
05-19-2004, 01:25 PM
None above described in forum helped..


Just adding what my Flash MX 2004
NetConnection Debugger detailed report says:

EventType: "Status"
MovieUrl: "file:///C|/Server/www/test_remoting/talk.swf"
Source: "Client"
Time: 1084988376270
Date (object #1)
....."Wed May 19 19:39:36 GMT+0200 2004"
Status (object #2)
.....code: 256
.....description: "This user is not does not have access to returnString"
.....details: "c:\server\www\flashservices\app\Executive.php"
.....level: "User Error"
.....line: 295

Some kind of user setting is required, but where and how ?!

Kate ;)

petefs
05-19-2004, 03:50 PM
I'll try looking at the tutorial you're speaking of, but try this one in the meantime:

http://www.sephiroth.it/tutorials/flashPHP/amfphp_installation/

destr3
06-26-2004, 05:42 PM
Hey Kate, maybe you're having a user authentication issue? Check out the examples that came with the latest version of AMFPHP (amfphp-0.9.0/sources/examples/basic/) for tips on how to properly use "roles" with the latest versions of amfphp, since that's been the source of a lotta confusion...

elvistheking
07-14-2004, 09:19 PM
I had the exact same problem, try using version 0.5.1 and it works beautifully! I have not had a look at the differences, but obviously there were some that have made the files in this tut break.
Thanks Jesse for the tut, and sorry to have bugged you!
Cheers,
H :)

petefs
07-14-2004, 10:24 PM
authentication/roles (setCredentials) was properly implemented in the new version and not accounted for by Jesse's tutorial. destr3 brings up a good point ; )