开发者

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: Ad开发者_JAVA百科ded 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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜