damned,昨天花了一天时间来调试,amfphp在liunx系统php5.3.X的版本下,一直会出错。
打开gateway.php正常,再打开services就报错:
(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"
网上搜到无数此情况,只是没有一个有能解决的办法。。。恼火啊。
后来看到这里才晓得,amfphp与php5.3.X搭配就是有问题。只好降格成php5.2.X,一切ok。
http://blog.csdn.net/gavin_guo/archive/2010/03/24/5410378.aspx
I don’t get PHP 5.3.1 working with amfphp 1.9.
I always got the following error:
(mx.rpc::Fault)#0
errorID = 0
faultCode = “Client.Error.MessageSend”
faultDetail = “Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed”
faultString = “Send failed”
message = “faultCode:Client.Error.MessageSend faultString:’Send failed’ faultDetail:’Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed’”
name = “Error”
rootCause = (Object)#1
code = “NetConnection.Call.Failed”
description = “HTTP: Failed”
details = “http://localhost/amfphp/gateway.php”
level = “error”
I don’t know what happens. And when I look into the apache error.log, I got:
[Mon Mar 22 20:53:05 2010] [error] [client 127.0.0.1] File does not exist: D:/Program Files/Apache/htdocs/amfphp/browser/history.htm, referer:http://localhost/amfphp/browser/
[Mon Mar 22 20:53:05 2010] [error] [client 127.0.0.1] File does not exist: D:/Program Files/Apache/htdocs/favicon.ico
After I googling, there is no good solution on this. Anything relevant for the root cause?
And meanwhile, I am using: Windows XP with SP3 and Apache 2.2.1
Solution finally identified as follows:
- Downgrade the PHP version to 5.2.X and then it works perfectly.
- PHP Version 5.3.x seems not compatible with Amfphp 1.9.
在排查问题的时候也看到了大家的一些其他方面的讨论,也一并放在这里了。
后来逛到天地会后发现一篇 关于AMFPHP1.9错误的处理方法:
(以下内容转自天地会- 后台技术讨论区 » 关于AMFPHP新版一些问题解决办法)
AMFPHP 1.9新版问题修改
1、Flash环境下访问方法失败,而自带调试SWF正常,修改amfphp\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();
}
2、访问ByteArray对象出错,修改amfphp\core\amf\io\AMFSerializer.php如下内容:
function writeAmf3ByteArray($d)
{
$this->writeByte(0x0C);
//$this->writeAmf3String($d, true);
$this->writeAmf3ByteArrayBody($d);
}
另需要在写PHP代码时,将AMFPHP的AMF设置为AMF3,Flash设置无效的,代码为$GLOBALS['amfphp']['encoding'] = 'amf3';
或修改amfphp\core\shared\app\Globals.php内容中的$amfphp['encoding'] = "amf0";为$amfphp['encoding'] = "amf3";
分享到:
相关推荐
amfphp flash
A javascript-based standards-friendly way of making Flash content accessible to browsers without Flash installed, including screen readers and primitive
amfphp1.9 flex php flex和php的桥连amfphp1.9 flex php flex和php的桥连amfphp1.9 flex php flex和php的桥连
amfphp,flash,flex,php
AMFPHP是Action Message Format(AMF)的一个开源PHP实现。用于在PHP与Flash播放器无缝交换数据。
amfphp 2.0 flash客户端与php服务端通信的工具
这个是官网的amfphp-2.1.1,供写flex和php的童鞋下载哇!里面附带我自己给它的使用方法。
AMFPHP是Action Message Format(AMF)的一个开源PHP实现。用于在PHP与Flash播放器无缝交换数据。
不想传递拆分字符串,解析串行XML了吧? 厌烦JSON了? 试试AMF吧,传送多种数据格式。
amfphp2.1.1版本,可用于php与flex等前端技术的通信
Apache + Php + Amfphp
不想传递拆分字符串,解析串行XML了吧? 厌烦JSON了? 试试AMF吧,传送多种数据格式。
amfphp和flex通讯的例子,一个及时聊天的例子,适合学习amfphp的朋友和网络开发的朋友学习
mysql+apache+php+phpMyAdmin+amfphp 配置教程 对新手来说还是很有用的 有什么不懂的可以来我的博客。
适合初学者看的东西,里面详细讲述了使用 amfphp 的方法。 amfphp 到底有吗用呢?其实很简单,他可以让php给你不同类型的 数据,而不仅仅只有json那的string了。
liaison entre le php et flex
PHP的amfext扩展,pecl.php.net上提供的0.9.2无法兼容php5.4+的版本,这个资源能确保amfext扩展在php5.4+的环境下编译成功。 本人分别在php5.4/5.5的生产环境中使用,一切正常,各位可以放心使用。
第十六节 了解amfphp.docx
基于AMFPHP的管理信息系统注册与登录模块设计.pdf
flex之amfphp通信实例源码,除了实例源码,还有一些其他帮助文件