3 Replies Latest reply on Sep 24, 2008 8:06 AM by Peter Lorent

    HELP ME

    Irfan_Uppal
      I followed all procedure, but when i created a new class MyService.php in amfphp/services, and want to check this class http://localhost/amfphp/browser
      this shows an error:
      (mx.rpc::Fault)#0
      errorID = 0
      faultCode = "Client.Error.MessageSend"
      faultDetail = "Channel.Connect.Failed error NetConnection.Call.BadVersion: "
      faultString = "Send failed"
      message = "faultCode:Client.Error.MessageSend faultString:'Send failed' faultDetail:'Channel.Connect.Failed error NetConnection.Call.BadVersion: '"
      name = "Error"
      rootCause = (Object)#1
      code = "NetConnection.Call.BadVersion"
      description = ""
      details = ""
      level = "error"

      Please help regarding above problem
        • 1. Re: HELP ME
          Peter Lorent Level 2
          From the debugger primer ( http://www.amfphp.org/docs/debugging.html)

          An error that will happen every once in a while is receiving a NetConnection.Call.BadVersion error in the NetConnection debugger. You can usually catch the source of this error by pointing to the debug gateway instead of the regular one. What happens is that the AMF message sent from AMFPHP to Flash was malformed. There are several possible reasons:

          A syntax error is causing PHP to write the error to standard output. ASCII output is not acceptable AMF, hence the error. There is an easy way to catch this. Load the service class from a web browser directly. If there is a syntax error, PHP should give you the line number that is causing the problem.
          A runtime error is causing AMFPHP to die with an error. This can be a bit more difficult to debug. Open the error log, open it and you should see where the error is coming from.
          Something is is outputting random data to the standard output, for example echo, print and such. This should have a much lesser chance of happening in 1.0 as there is an output buffer set up in loose mode to prevent these to reaching standard output. The only thing you should be careful about is returns (line feeds) before or after <?php ?> at the beginning and end of the gateway.php file.
          Another common error is NetConnection.Buffer.Underflow. This could happen if you exit without error from a method for example using die(). There are subtle other cases where this might also happen, such as if you hard code the return type inappropriately.
          • 2. Re: HELP ME
            Irfan_Uppal Level 1
            Thank you very much for helping.
            i will check the php code in detail.
            i m using on localhost is there any need of NET?
            • 3. Re: HELP ME
              Peter Lorent Level 2
              As long as localhost is configured properly... no. Are you using something like xamp?