注册 登录
编程论坛 ASP技术论坛

amfphp报错----Error #2044: 未处理的 NetStatusEvent:。

gslfaye 发布于 2010-05-17 18:10, 1385 次点击
语言:php,flash remoting
环境:wampserver2.0h(Apache 2.2.11,php 5.2.9,mysql 5.1.33), Flash CS4, amfphp1.9

"http:// www@rightactionscript@com/flashremoting/gateway.php" (@改为.) 这个网关测试是可以的,有返回数据。
本地amfphp/browser/测试和amfphp/gateway.php测试也是正确的。
但是连接本地网关就会报错:
Error #2044: 未处理的 NetStatusEvent:。 level=error, code=NetConnection.Call.BadVersion。

请问是哪里配置错误吗?


我已经找到解决这个问题的办法了。现更新如下,希望能给后来人一个参考。

打开PHP_error.log,搜索VerboseException,看到:
[19-May-2010 09:57:17] PHP Fatal error:  Uncaught exception 'VerboseException' with message 'Standalone Flash player disabled. Update gateway.php to allow these connections' in E:\wamp20h\www\amfphp 1.9\core\amf\app\Gateway.php:357

打开amf/gateway.php,找到代码:
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(); //注释掉
}
将这两句注释掉,重启服务,在尝试连接即可。为什么要注释掉,自己看下说明。

[ 本帖最后由 gslfaye 于 2010-5-20 09:51 编辑 ]
2 回复
#2
yms1232010-05-17 18:41
PHP问题请去PHP专区提问。
#3
gslfaye2010-05-20 09:50
回复 2楼 yms123
呃。。。看错了。以为是AS讨论区。
1