Please use this thread to post tips on getting AMFPHP to work correctly.
To Start it off here is some general info from amfphp.org:
NetConnection.Call.BadVersion errorA very common issue is to get a "NetConnection.Call.BadVersion" answer in your NetConnection debugger. There are various causes for this failure; the general reason is that the client doesn't receive a correctly formatted AMF message. This is generally due to installation errors, parse errors in your code, or any number of other reasons. The most common are listed below.
- The AMFPHP installation was not correctly performed; the gateway cannot find the libraries. You can check this by pointing your browser at your gateway URL, for instance: http://host/flashservices/gateway.php. If any PHP errors appear, the gateway is not correctly installed. Perform the AMFPHP installation correctly.
- Your service has parse errors. Point your browser at the URL of your services, for instance: http://host/flashservices/services/examples/ExSrv.php to see what parse errors are prevalent in your code.
- Your script is pushing data into the output buffer. Check that your script has no leading OR trailing newlines or spaces and that your script isn't outputting any data with an echo, print, or other similar control structure or function as this will result in sending this data to the client, before the actual AMF message is sent.
- If you work under Windows or Mac OS X, your editor may be creating incompatible line breaks. Windows terminates every line with CRLF (\n\r); some applications in Mac OS X terminate lines with the standard Mac line ending (chr(13)) plus a CR (\n). We suggest the following editors for Windows users:
Macromedia DreamWeaver MX (Windows and Mac OS X) with the preferences set to use LF (Unix) line breaks.
vi (Windows and Mac OS X)
EditPlus in combination with Flush
UltraEdit in combination with syntax highlighting
SciTE|Flash .[/*]
[/list]
From the above issue's: One of the biggest to watch out for is the 'pushing data into the output buffer'. This means that if you have any space (at all) or any line breaks outside of your php tags ie <? ?> your script will break because of corrupted amf. This is a difficult one to catch at when first using amfphp because error messages will not be returned.
FOR PHP 5 usersException problemYou must to rename Exception class and all its calls so something else (Amf_Exception in my case)
Then all works fine.
Using trigger_error() breaks the output, just giving a Badversion. Anyway Exceptions.php sets the set_error_handler to reportExceptions ... should check better this.
Using throwException (or throw Amf_Exception now) needs a reference to the body that I'm not sure how to build (it's a member in ClassLoaderAction.php and SecurityAction.php, the two classes I see are using exceptions)
See
http://www.flash-db.com/Board/index.php?board=24;action=display;threadid=10244Constructor problem (check first if works with previous fix) Check
http://sourceforge.net/mailarchive/message.php?msg_id=8907838AMFPHP: Multiple service calls problem: see
http://www.flash-db.com/Board/index.php?board=19&action=display&threadid=10690