简体   繁体   中英

AMFPHP Bad Version error when having multiple simultaneous calls to gateway.php

I'm currently using AMFPHP 1.9 to make a simple flash game which uses a game server.

Sometimes, I get this error (BadVersion) when there are simultaneous calls to the server.

I've searched the web for some of the answers to this problem, and it seems they were answered back in 2004.

Is there an updated version of how to solve this problem?

I tried to change the globals.php parameters to use absolute path, like performing the below:

//$servicesPath = "services/";
//change to
$servicesPath = "/httpdocs/Flash/AMFPHP/services/";

but I cannot even go to the services browser when i changed it.

Updates: I managed to change to the correct path (by getting the path using a custom php which displays get_cwd())

So services browser is up now. However, i still get the timeout every now and then. (my request to the server is at about 5 mins interval)

I tried to spam querying to the server to determine if it was due to simultaneous calls, and realized it is not. (my local flash spams 30 X 3 requests / second and it work fine )

So now I suspect it might be due to timeout of the netconnection or something similar?

Update: Added keepalive call to server every 2 mins interval to see it it occur again. Webserver timeout seems to be set to 180 seconds.

There was actually a new version released very recently (last 2 weeks) so definitely check that out to see if it helps.

I don't know your system (obviously) but I doubt that your absolute path there is correct, I would verify that, or set it back to the default. (It would probably start '/var/www/...' or similar)

I've leveraged amfphp on quite a few high traffic sites, and have never seen this error as a result of that, so definitely don't ignore other possibilities. Look carefully at the data your are sending/receiving for any possible errors there. Can it be encoded properly? Are their special characters, perhaps accent characters?

Try to narrow down the source of the error, is there one call that is always causing it? Perhaps try logging the results.

Goodluck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM