Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6774391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:46:53+00:00 2026-05-26T15:46:53+00:00

I recently upgraded to Flash Builder 4.5 for PHP and am trying to upload

  • 0

I recently upgraded to Flash Builder 4.5 for PHP and am trying to upload a release build to my remoteserver. When I try to make a php call from the app, I get the error:

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

The release build works fine on my localhost machine. All of my php service calls are on my remote host. Here’s the structure of my remote host:

/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)

The error specifically references ‘localhost’, but I can’t find where that gets set. When I google error #2048, the solutions point to a badly configured crossdomain file…all my services are on remotehost (where the app is hosted) so I don’t think that could be the issue.

Here is my amf_config.ini file:

[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

Here is my gateway.php file:

<?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();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:46:54+00:00Added an answer on May 26, 2026 at 3:46 pm

    i had the same problem in a flex – blaze – environment. The real Problem was the context-root in the project properties.
    because you used flex 4.5, there is no input field for this setting. in flex builder 3, there was a setting in the project properties -> flex server -> context root.

    i gone crazy and found after hours an article on adobes bugs-site [FB-22939].

    That solve my problem. I have no idea, wich project settings you are using, try to search a string named {context.root} in your project or post a liite bit more about your project settings. i know blaze is different from php, but maybe it is a tip bringing you back on track.

    Unfortunately I’m not able to reproduce my thread and setting up an php environment with more knowledge about your setup. (Server-Technology, and so one)

    edit:
    additional Info:
    I’ve found a list of all compiler arguments. Try it with this argument:

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

    br
    Frank

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently upgraded my Flash Builder from Burrito to 4.5 Premium. I am trying
I recently upgraded to Flash Builder 4.5 for PHP since I’m working on a
I recently upgraded my Silverlight app from 3 to 4. After a few hours
I used TortoiseSvn for source control in my flash projects. I recently upgraded from
I recently upgraded to Xcode4 and noticed that my build/Release-iphoneos folder no longer gets
I recently upgraded my oracle client to 10g (10.2.0.1.0). Now when I try to
I recently upgraded from Delphi 4 to Delphi 2009. With Delphi 4 I had
I recently upgraded to Eclipse Ganymede from Europa and now I'm finding that when
I recently upgraded a Web Application Project (as well as some dependent projects) from
I recently upgraded my Google App Engine launcher on my Mac, running OSX 10.5.8,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.