开发者

FlashBuilder 4 and Zend Framework error

开发者 https://www.devze.com 2023-01-03 06:59 出处:网络
I am trying to use adobe flash builder 4 with a php service.I had it set up an older macbook running leopard, but just tried to set it up on my new laptop running snow leopard.I did all the same steps

I am trying to use adobe flash builder 4 with a php service. I had it set up an older macbook running leopard, but just tried to set it up on my new laptop running snow leopard. I did all the same steps.. set the Flex Server to be PHP, set the web root and url. Then I go to Data->Connect To PHP and point it to a php file I have in my web root. It says it needs to install Zend, and claims it does so successfully, but then when I try to continue, I get an error. I don't understand.. this same setup works on my older laptop.

(Yes, I checked the amf.production was false)

Unable to retrieve operations and entities from the file

Make sure that Zend Framework is installed correctly and the parameter "amf.production" is not set to true in the amf_config.ini file located in the project output folder. false), true);$default_config->merge(new Zend_Config_Ini($configfile, 'zendamf'));$default_config->setReadOnly();$amf = $default_config->amf;// Store configuration in the registryZend_Registry::set("amf-config", $amf);// Initialize AMF Server$server = new Zend_Amf_Server();$server-开发者_JAVA百科>setProduction($amf->production);if(isset($amf->directories)) { $dirs = $amf->directories->toArray(); foreach($dirs as $dir) { // get the first character of the path. // If it does not start with slash then it implies that the path is relative to webroot. Else it will be treated as absolute path $length = strlen($dir); $firstChar = $dir; if($length >= 1) $firstChar = $dir[0]; if($firstChar != "/"){ // if the directory is ./ path then we add the webroot only. if($dir == "./"){ $server->addDirectory($webroot); }else{ $tempPath = $webroot . "/" . $dir; $server->addDirectory($tempPath); } }else{ $server->addDirectory($dir); } }}// Initialize introspector for non-productionif(!$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 requestecho $server->handle();


Ftr, figured out the problem - php wasn't enabled for my local web root.

0

精彩评论

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