0 Replies Latest reply on Mar 5, 2012 7:21 PM by lucasgms

    Error generating sample PHP service from database




      When I try to create a sample PHP service from database I get an "Unable to conect to database" error. The message displayed is some truncated code:


      "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->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();"


      Anyone has a clue on the causes of this?