Active
Project:
AMFPHP
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
20 Feb 2009 at 17:29 UTC
Updated:
24 May 2011 at 18:50 UTC
Jump to comment: Most recent file
Hello I am using the following configuration :
amfphp 6.x-1.0-beta1
services 6.x-0.13
I have configured services module,permissions and api key but I got this error message as I try to connect by flash AS3 script :
DrupalSite: error while attempting to invoke Drupal service
description: Method system.connect does not exist.
code: AMFPHP_RUNTIME_ERROR
details: C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\FlashDrupal\sites\all\modules\amfphp\amfphp.module
level: Unknown error type
line: 106
Any help appreciated thanx in advance Marco Gonnelli
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | servicePermissionsDev-1.jpg | 31.2 KB | sanbeaman |
Comments
Comment #1
snelson commentedEnable system_service.module
Comment #2
DrplMG commentedSry forgot toI enable system_service.module.
thanx.
Marco
Comment #3
robbertnl commentedI also got an AMFPHP runtime error:
fault: [RPC Fault faultString="Access denied." faultCode="AMFPHP_RUNTIME_ERROR" faultDetail="D:\Apache2.2\htdocs\drupal\sites\all\modules\amfphp\amfphp.module on line 106"]
The settings/modules i am using:
-method: node.get
-enabled services for nodes.
-disabled Use keys and Use sessid
-Services 6.x-1.x-dev
-AMFPHP 6.x-1.0-beta1 with AMFPHP 1.9 beta 2
Comment #4
bluestarstudios commentedI'm getting the same original error ("
Method <em>something.something</em> does not exist").I have the system service enabled. What else am I doing wrong?
Comment #5
robbertnl commentedI got it all working by following this tutorial: http://electricpineapple.net/?p=32
Comment #6
bluestarstudios commentedDoes anybody know of any tutorials how to make AMFPHP work with Flash CS3/CS4 (AS3)?
Comment #7
Mershin commentedI was getting this error in Flash CS3(AS3).
I followed http://thanksfornotsuing.com/discussion/flash-integration-drupal-6
And then I was still getting AMFPHP_RUNTIME_ERROR line 106 (yes I had everything configured correctly).
I had Keys turned off, sessionIds turned on. I was able to 'trace' a SessionID that was returned, but when I called node.get, I got the runtime error.
Personally my problem in the end? I was trying to connect to www.domainname.com/services/amfphp while running the compiled swf from the flash IDE.
I turned on the debugger and saw that flash really does not like some sort of new security restriction involving master policy file. It's something like crossdomain.xml but not exactly? I did have a crossdomain.xml that allowed 'everything', but flash was ignoring it (The debug message actually said it was ignoring it). Anything flash player 9.0.124+ has this security requirement.
Once I uploaded my swf file to domainname.com, it pulled the node info correctly.
I imagine if you're running drupal on localhost, it should work?
A few things I had to double check:
- services/amfphp module enabled
- the services modules for node & service enabled (another set of modules included.)
- enabled sessionid but disabled keys in the services config.
I guess that's it.. latest versions of everything as of today, on drupal 6.
Comment #8
libeco commentedI bought the book Flash in Drupal by Travis Tidwell and was following along chapter two which also shows a very basic way of loading Drupal data into Flash. I'm used to OO as I learned that at school, so I was using proper classes and was presented the same error. So I tried the example code from the book and again got the error. I have tried contacting Travis Tidwell through his site, with a link to this topic. I hope he has a solution, otherwise it seems like money thrown away for a book which shows code that doesn't work.
I was trying locally. I have tried loading the swf through localhost, but nothing was loaded.
I hope there's a solution to this problem...
Comment #9
Mershin commentedI do have a working drupal/flash implementation...
This is the basics... (Using Flash CS4 IDE)
If you get a sessionid outputted... then you're in business. If you can't get that far, then it's a configuration issue. Take a closer look at permissions section after you enable services & amfphp. I broke my brain getting it to work but hey when you have a deadline and you're on the 8th can of diet pepsi... something ends up working :p
If you got this far... I can get into node or views data.
I'm pulling 5 different content types of data into a flash interface with cck fields, including pictures being pulled/displayed, and the flash interface links to the drupal content. I have working code examples if you're this far.
Comment #10
libeco commentedThanks for helping. I do get the sessionID, also with the code from the book. But getting the node seems to be the problem for me.
This was my code as I got it from the book:
*edit*
Actually, I just realised the opening poster is using Services 6.x-0.14, while I'm using Services 6.x-2.x-dev, don't know if that makes a difference?
Comment #11
Mershin commentedhmm.. I have 6.x-0.13 installed. I think that may be your problem... dev version must be doing something different. Try 6.x-0.14?
This works on my install... it traced the title of the node.
Comment #12
libeco commentedI had some e-mail contact with the author of the book and he also said that I should use 0.14. I just tried with your code and it indeed works now, even on localhost.
Thanks!
Comment #13
Mershin commentedNo problem. Enjoy Flash & Drupal Integration. I'm having fun using views with arguments based on user input to pull subsets of data to display :)
Comment #14
sanbeaman commentedI'm hoping you solved this, and if so could offer some help.
I was following the tidwell Hello World exercise.
Initially, I had installed Services 6.x -0.14 , but after a couple hours of deactivating, reactivating, reinstalling, etc..
I found an issue posted by Tidwell himself. (still unresolved as of July 6th, 2009)
http://drupal.org/node/504526
Where the Keys won't show up....
So I had to install the Dev version 6.x-2.x-dev
At which point I was having the same issue as libeco
SessionID comes back no problem.
But trying to access node title I would get the error:
.....
Missing Required Arguments
106
AMFPHP_RUNTIME_ERROR
......
Since 0.14 permissions are set up different than 6.x-2.x-dev
I guessed at opening up what seemed like similar permissions as "access services"
System_service module
-check module exists from remote: (all three checked)
-get variable from remote: (all three checked)
-set variable from remote (all three checked)
see attached image.
this still didn't help.
It was only after I unchecked Use Keys, in the Services Settings.
Maybe it's me, and believe me it's me 99% of the time,
but I don't see passing the KEY in any of the code examples in book or in this thread?
has any one successfully retrieved the node.title, using version 6.x-2.x-dev and using both security methods, SessionId and KEY?
drewbe
that
Comment #15
sanbeaman commentedThe errata for the book pretty much answers my above question:
http://www.packtpub.com/view_errata/book/build-flash-applications-with-d...
Dev-services pack handles KEYs in different way, so using it you have to turn off KEYS.
icarus (drewbe_
Comment #16
Mershin commentedhmm... only way I got it to work myself was with sessionIDs "on" but KEYS "off'. This is of course a security concern, but since my flash application only needed to "read" from Drupal, and not do anything that "could" be a security concern, that was ok for me.
Good to know the info from the above link since I was using 6.13 and 6.14 came out shortly after I started my project. Good thing I didn't update mid-project :)
Comment #17
pisosse commentedhmmm... I got this version of the amfphp problem
"You have an error in your SQL syntax" and this is after a reinstallation of drupal og rebuild of the DB.. I'm getting crazy
edit:
now..the problem is that services node.get dont get nodeid..what to do?
Comment #18
darkodev commentedI can confirm that I can now pull node data after going to admin/build/services/settings, selecting "Key authentication" from the drop-down, and unchecking "Use keys." It wasn't intuitive that I had to choose an authentication method, then disable it with a checkbox.
Works from the IDE, and from localhost.
Using Services 6.x-2.0-beta1
Thanks to everyone on this thread!
Comment #19
miglsilva commentedAlert:
I had similar problems with AMFPHP in Flash and I found an incompatibility with the DEVEL module (services_admin_browse.inc - line 188).
I desabled this module and now my "Hello Worls" works very well.
Comment #20
nexus74 commentedThank you darko! That worked for me as well. Yes, having to enable "Key authentication", then disabling it in service settings is VERY counter-intuitive...
Comment #21
jdeg commentedSomebody found the way to use "Use keys". What could be the possible security issues without using it?
Thanks in advance!