all groups > macromedia flash flash remoting > december 2003 >
You're in the

macromedia flash flash remoting

group:

AMFPHP example problems.


AMFPHP example problems. gknow
12/2/2003 5:48:44 AM
macromedia flash flash remoting:
Been trying the AMFPHP tutorial (http://www.macromedia.com/devnet/mx/flash/articles/amfphp.html). I put the flashservices dir in my web server's document root (public_html/flashservices). The gateway is on the root as well (http://www.gknow.com/gateway.php). This is not the Gateway.php in app/Gateway.php. Accessing the gateway.php script directly shows no parse errors. Neither does the ServerInfoService.php file in the services directory. When I run the flash file and try and get some server info, i get the following error message from NetConnection Debugger:

DebugId: 0
EventType: "Status"
MovieUrl: "file:///E|/gene's docs/site/public_html/Project_Files_PC/Flash_source/ServerInfoServices.swf"
Protocol: "http"
Source: "Client"
Time: 1070342823784
Date (object #1)
......"Mon Dec 1 22:27:03 GMT-0700 2003"
Status (object #2)
......code: 256
......description: "This user is not does not have access to getInfo"
......details: "/home/genotype/public_html/flashservices/app/Executive.php"
......level: "User Error"
......line: 295

I'm not sure why I wouldn't have access to getInfo(). All the files in the site are CHMOD 755. I tried running phpinfo(), et al, in seperate php files and was able to get info returned.

The service browser doesn't return the getInfo either. When I refresh the service I get a blank window with a button that says "done" on the bottom. I know from experience that if my paths were screwed up the progress bar just spins it's wheels. This seems like it's connecting.

Checked every tutorial I could find on this, including the AMFPHP website. As far as I know I have everything set up right.

Thanks,
Gene

ok, figured it out my own self gknow
12/2/2003 8:18:50 PM
This was the function in Executive.php that was puking (line 295):

function checkRoles ()
{
if(isset($this->methodrecord['roles'])) {
if(!Authenticate::isUserInRole($this->methodrecord['roles'])) {
trigger_error("This user is not does not have access to " .
$this >_methodname,E_USER_ERROR);
}
}
}

I wasn't sure what checkRoles was doing, but I do remember the example script mentioning something about roles not being implemented. The example is also using AMFPHP ver. 0.5.1 (I think). The latest version is 0.9.0, which I knew was going to cause me problems somewhere. In the service file (ServerInfoService.php), there is this line (line 25) in the methodTable array (actually part of getInfo):


"roles" => "role, list", // currently inactive

Note the comment.

I guess maybe that line didn't work when the tutorial was written, but didn't screw it up either. It does now. I commented out this line and it seems to work fine.

Anyone know how roles was supposed to be implemented?



Re: ok, figured it out my own self chris
12/14/2003 5:05:08 PM
[quoted text, click to view]
when you declare your methods in the method table there is an array
value called role, if you just delete that from your method table you
won't have to mess with the guts of amfphp
AddThis Social Bookmark Button