Channel.Security.Error...错误 #2048

2024-05-09

我最近升级到 PHP 版 Flash Builder 4.5,并尝试将发布版本上传到我的远程服务器。当我尝试从应用程序进行 php 调用时,出现错误:

Send failednChannel.Security.Error error Error #2048 url: 'http://localhost/my_php/public/gateway.php'

发布版本在我的本地主机上运行良好。我所有的 php 服务调用都在我的远程主机上。这是我的远程主机的结构:

/my_directory/html (this is the root directory)
/my_directory/html/my_php/public/release  (this is where my .html wrapper and .swf files sit)
/my_directory/html/my_php/public (this is where my gateway.php and amf_config.ini files sit)

该错误特别引用了“localhost”,但我找不到设置的位置。当我谷歌错误#2048时,解决方案指向配置错误的跨域文件...我的所有服务都在远程主机(托管应用程序的位置)上,所以我认为这可能不是问题。

这是我的 amf_config.ini 文件:

[zend]
webroot = "/my_directory/html"

zend_path ="/my_directory/html/ZendFramework/library"
library ="/my_directory/html/my_php/library"
services ="/my_directory/html/my_php/services"

[zendamf]
amf.production = false
amf.directories[]=/my_directory/html/my_php/services

这是我的 gateway.php 文件:

<?php
ini_set("display_errors", 1);
$dir = dirname(__FILE__);
$webroot = $_SERVER['DOCUMENT_ROOT'];
$configfile = "$dir/amf_config.ini";
$servicesdir = $dir.'/../services';
$librarydir = $dir.'/../library';
//default zend install directory
$zenddir = $webroot.'/ZendFramework/library';
//Load ini file and locate zend directory
if (file_exists($configfile)) {
$arr = parse_ini_file($configfile, true);
if (isset($arr['zend']['webroot'])) {
    $webroot = $arr['zend']['webroot'];
    $zenddir = $webroot.'/ZendFramework/library';
}
if (isset($arr['zend']['zend_path'])) {
    $zenddir = $arr['zend']['zend_path'];
}
if (isset($arr['zend']['library'])) {
    $librarydir = $arr['zend']['library'];
}
if (isset($arr['zend']['services'])) {
    $servicesdir = $arr['zend']['services'];
}
}
// Setup include path
// add zend directory, library and services to include path
set_include_path(get_include_path()
.PATH_SEPARATOR.$zenddir
.PATH_SEPARATOR.$librarydir
.PATH_SEPARATOR.$servicesdir);
// Initialize Zend Framework loader
require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true)->suppressNotFoundWarnings(true);
// Load configuration
$default_config = new Zend_Config(array("production" => false), true);
$default_config->merge(new Zend_Config_Ini($configfile, 'zendamf'));
$default_config->setReadOnly();
$amf = $default_config->amf;
// Store configuration in the registry
Zend_Registry::set("amf-config", $amf);
// Initialize AMF Server
$server = new Zend_Amf_Server();
$server->setProduction($amf->production);
if (isset($amf->directories)) {
$dirs = $amf->directories->toArray();
foreach ($dirs as $dir) {
    if ($dir == "./") {
        $server->addDirectory($webroot);
    } else 
        if (realpath("{$webroot}/{$dir}")) {
            $server->addDirectory("{$webroot}/{$dir}");
        } else 
            if (realpath($dir)) {
                $server->addDirectory(realpath($dir));
            }
}
}
// Initialize introspector for non-production
if (! $amf->production) {
$server->setClass('Zend_Amf_Adobe_Introspector', '', 
array("config" => $default_config, "server" => $server));
$server->setClass('Zend_Amf_Adobe_DbInspector', '', 
array("config" => $default_config, "server" => $server));
}
// Handle request
echo $server->handle();

我在 Flex - blaze - 环境中遇到了同样的问题。真正的问题是项目属性中的上下文根。 因为您使用的是 flex 4.5,所以没有此设置的输入字段。在flex builder 3中,项目属性-> flex服务器->上下文根中有一个设置。

我发疯了,几个小时后发现了一篇关于 adobes bugs-site [FB-22939] 的文章。

这解决了我的问题。我不知道您正在使用哪个项目设置,请尝试在您的项目中搜索名为 {context.root} 的字符串或发布有关您的项目设置的更多信息。我知道 blaze 与 php 不同,但也许这是一个让您重回正轨的提示。

不幸的是,我无法重现我的线程并设置一个关于您的设置的更多知识的 php 环境。 (服务器技术等)

编辑: 附加信息: 我找到了所有编译器参数的列表。尝试用这个论点:

-context-root <context-path>
    full name -compiler.context-root
    path to replace {context.root} tokens for service channel endpoints

br Frank

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Channel.Security.Error...错误 #2048 的相关文章

随机推荐

  • 十六进制数的按位异或

    我们如何在 Python 中对十六进制数进行异或 例如 我想要异或 ABCD and 12EF 答案应该是 B922 我使用了下面的代码 但它给出了错误的结果 xor two strings of different lengths def
  • 完成特定 Activity 的所有实例

    应用程序中可以有很多活动 最后启动的活动保留在堆栈顶部 按下后它会完成当前活动 我有一系列活动 这是流程 如果我们有 A B C 1 D C 2 活动 C 1 和 C 2 是在导航应用程序时启动的活动 C 的两个不同实例 因此 必需的是清除
  • 如何通过代码设置Fragment标签?

    我还没有找到类似的东西setTag String tagName 方法中的Fragment班级 唯一的方法是设置Fragment我发现的标签是通过做FragmentTransaction并传递标签名称作为参数 这是显式设置的唯一方法吗Fra
  • 如何使用restify上传文件

    我正在尝试使用 Restify 模块将图像文件上传到 Rest 服务器 更具体地说是 Confluence 但出现断言错误 我不确定我是否使用正确的方法将文件上传到 REST 服务器 有人能指出我正确的方向吗 这是我的尝试 var rest
  • oracle中是否有相当于concat_ws的东西?

    我有大量的列试图聚合在一起 其中大多数都有 NULL 值 我想分隔确实以 出现的值但我在oracle中找不到有效的方法来做到这一点 CONCAT WS 正是我所需要的 因为它不会在 NULL 值之间添加分隔符 但 Oracle 不支持这一点
  • 使用 jQuery Mobile 和响应式布局/CSS 媒体查询是否多余?

    我正在退房http mediaqueri es http mediaqueri es 今天发现这些网站非常适合移动设备 所以我想知道将 jQuery Mobile 和响应 自适应布局与媒体查询一起使用是否是多余的 因为仅使用媒体查询似乎是一
  • 最佳 DLL 符号转储实用程序

    我有数百个 DLL 属于一个巨大的意大利面条代码项目 需要查看它们导出或导入哪些调用 如果我能够获得 DLL 之间的依赖关系图 那就太好了 有人可以推荐我免费且可靠的实用程序吗 编辑 依赖遍历器似乎还不够 我不仅需要获取所需 DLL 的列表
  • 在 Oracle 临时表上放置索引安全吗?

    我读过 不应分析临时表 因为它会破坏其他表的统计信息 指数怎么样 如果我在程序运行期间在表上放置索引 使用该表的其他程序会受到该索引的影响吗 索引是否会影响我的进程以及使用该表的所有其他进程 或者它会单独影响我的过程吗 所有的回复都不是权威
  • 这个功能在 C# 中被称为什么以及 C# 的哪个版本使用此功能

    我在我的项目中使用了这行代码 但还没有看到这个语法 internal static StringBuilder a this StringBuilder sb string b gt sb Append b Append n 谁能告诉我这叫
  • 如何使用基于 Spring MVC 注解的 Portlet 控制器通过 AJAX 呈现 JSON 视图/响应?

    在过去的六个小时里 我在 Google 和 stackoverflow 上搜索了这个问题的答案 我最初是一名 PHP 开发人员 所以请耐心等待 从 PHP 控制器返回 JSON 数组非常简单 我正在使用 Spring MVC 3 0 我只想
  • 运行 npm install 时出错 Error: 404 Not Found: 7zip-bin@~4.1.0

    当我运行 npm install 时 我看到此错误 3 verbose stack Error 404 Not Found 7zip bin 4 1 0 2293 verbose stack at fetch then res C cygw
  • 从字符串中删除货币符号并使用 Javascript 中的单行转换为数字

    我下面有一个字符串 它是以英镑为单位的价格 我想删除货币符号 然后将其转换为我可以用来与另一个值进行比较的数字 价格 例如 X gt Y 14 50 我之前已将字符串转换为用于货币的数字 var priceNum parseFloat pr
  • 如何让material-ui文本字段中的标签位于右侧?

    我在用着material ui and typescript对于我的 React 项目 rtl 布局 我不知道如何将文本字段的标签放在右侧 找到了更好的方法without外部库 export const theme createTheme
  • 为什么matlab的mldivide比dgels好这么多?

    Solve Ax b 真正的双 A是超定的 Mx2 其中 M gt gt 2 b是MX1 我运行了大量的数据mldivide 并且结果非常好 我用 MKL 写了一个 mex 例程LAPACKE dgels但它远没有那么好 结果有大量噪音 并
  • 网页抓取(R 语言?)

    我想获取中间栏中的公司名称this http www consumercomplaints in bysubcategory mobile service providers page 1 html页面 以蓝色粗体书写 以及登记投诉者的位置
  • 如何使用 RxJava 处理分页?

    我正在考虑将我的 Android 应用程序转换为使用 Rxjava 进行网络请求 我目前访问的网络服务类似于 getUsersByKeyword String query int limit int offset 据我了解 Observab
  • 在 Swift 2.0 中隐藏 Home 指示器

    我希望隐藏 Home Indicator 虽然这在 Swift 中很简单 但在 SwiftUI 中似乎并不那么容易 我尝试使用这个 如何使用 SwiftUI 隐藏 home 指示器 https stackoverflow com quest
  • 在 HTML SELECT 标记中禁用键盘

    我想禁用 HTML SELECT 标记的键盘 以便用户只能使用鼠标来选择选项 我试过了event cancelBubble true on the onkeydown onkeyup and onkeypress没有运气的事件 有任何想法吗
  • PrintStream是有缓冲的,但是flush不会降低性能,而BufferedOutputStream会加速性能

    我预计由于 PrintStream 是缓冲的 通过在每次 print 之后添加刷新操作 速度性能应该会显着降低 但事实并非如此 如下面的代码片段所示 此外 将 PrintStream 包裹在 BufferedOutputStream 周围可
  • Channel.Security.Error...错误 #2048

    我最近升级到 PHP 版 Flash Builder 4 5 并尝试将发布版本上传到我的远程服务器 当我尝试从应用程序进行 php 调用时 出现错误 Send failednChannel Security Error error Erro