Error message:
Fault (MX. messaging. Messages: errormessage) #0
Body = (object) #1
Clientid = (null)
Correlationid = "3541add2-5245-3c38-a8b6-92dfc59da055"
Destination = ""
Extendeddata = (null)
Faultcode = "client. Error. messagesend"
Faultdetail = "channel. Connect. Failed error netconnection. Call. badversion: URL: 'http: // localhost/amfphp/gateway. php '"
Faultstring = "failed to send"
Headers = (object) #2
Messageid = "70675b80-508d-99f8-87b2-92dfca00b9d7"
Rootcause = (MX. messaging. Events: channelfaultevent) #3
Bubbles = false
Cancelable = false
Channel = (MX. messaging. channels: amfchannel) #4
Authenticated = false
Channelsets = (array) #5
Connected = false
Connecttimeout =-1
Enablesmallmessages = true
Endpoint = "http: // localhost/amfphp/gateway. php"
Failoveruris = (array) #6
Id = "My-amfphp"
Mpienabled = false
Netconnection = (flash.net: netconnection) #7
Client = (MX. messaging. channels: amfchannel) #4
Connected = false
Maxpeerconnections = 8
Objectencoding = 3
Proxytype = "NONE"
Uri = "http: // localhost/amfphp/gateway. php"
Piggybackingenabled = false
Polling = false
Pollingenabled = true
Pollinginterval = 3000
Protocol = "HTTP"
Reconnecting = false
Recordmessagesizes = false
Recordmessagetimes = false
Requesttimeout =-1
Uri = "http: // localhost/amfphp/gateway. php"
Url = "http: // localhost/amfphp/gateway. php"
Usesmallmessages = false
Channelid = "My-amfphp"
Connected = false
Currenttarget = (MX. messaging. channels: amfchannel) #4
Eventphase = 2
Faultcode = "channel. Connect. Failed"
Faultdetail = "netconnection. Call. badversion: URL: 'http: // localhost/amfphp/gateway. php '"
Faultstring = "error"
Reconnecting = false
Rejected = false
Rootcause = (object) #8
Code = "netconnection. Call. badversion"
Description = ""
Details = ""
Level = "error"
Target = (MX. messaging. channels: amfchannel) #4
Type = "channelfault"
Timestamp = 0
Timetolive = 0
The above error message is reported. This is the case after debugging for a long time. no error is reported when mxml is called internally, but this is called by other modules. this happens when mxml is used.
When I put the project on the internet server for testing, the test information can be returned normally, but the above error message is displayed during local debugging.
Amfphp on the internet is dragged on the same folder on the local machine. Therefore, such an error cannot be solved;
After a visit to the conference, I found a solution for amfphp1.9 error:
The solution for my local machine is to separate/$ gateway-> disablestandaloneplayer () according to the method below; comment it out and it will be OK!
(The following content will be transferred to the Apsara infrastructure management framework-background technical discussion board» solutions to new amfphp versions)
New version of amfphp 1.9
1. The access method fails in the Flash environment, but the built-in SWF debugging is normal. Modify amfphp \ gateway. php as follows:
If (production_server)
{
// Disable profiling, remote tracing, and service Browser
$ Gateway-> disabledebug ();
// Keep the Flash/flex ide player from connecting to the Gateway. Used for security to stop remote connections.
// $ Gateway-> disablestandaloneplayer ();
}
2. An error occurred while accessing the bytearray object. Modify amfphp \ core \ AMF \ IO \ amfserializer. php as follows:
Function writeamf3bytearray ($ D)
{
$ This-> writebyte (0x0c );
// $ This-> writeamf3string ($ D, true );
$ This-> writeamf3bytearraybody ($ D );
}
When writing PHP code, set AMF of amfphp to amf3. The flash setting is invalid. The code is $ globals ['amp'] ['encoding'] = 'amp3 ';
Or modify $ amfphp ['encoding'] = "amf0" in the amfphp \ core \ shared \ app \ globals. php content to $ amfphp ['encoding'] = "amf3 ";