php - Error in configuration Zend Framework 1.12 application.ini -


i'm making simple website have use table db , perform webservice task. nothing complicated. i've taken configuration other projects in root folder , pasted them in configuration, , bootstrap files. application ini following:

[production] phpsettings.display_startup_errors = 0 phpsettings.display_errors = 0 phpsettings.date.timezone = "europe/rome" includepaths.library = application_path "/../library" bootstrap.path = application_path "/bootstrap.php" bootstrap.class = "bootstrap" appnamespace = "application"  resources.frontcontroller.controllerdirectory = application_path "/controllers" resources.frontcontroller.params.displayexceptions = 0 includepaths.library = application_path "/../library" resources.layout.layoutpath = application_path "/layouts/scripts/"  ;connessione al db resources.db.adapter = pdo_mssql resources.db.params.host = "ip" resources.db.params.username = user resources.db.params.password = pwd resources.db.params.dbname = name resources.db.isdefaulttableadapter = true resources.db.params.pdotype = dblib  [staging : production]  [testing : production] phpsettings.display_startup_errors = 1 phpsettings.display_errors = 1  [development : production] phpsettings.display_startup_errors = 1 phpsettings.display_errors = 1 resources.frontcontroller.params.displayexceptions = 1 ;resources.db.adapter = pdo_mssql 

my bootstrap file following:

<?php  class bootstrap extends zend_application_bootstrap_bootstrap {     public function _initautoloader(){         zend_loader_autoloader::getinstance()->setfallbackautoloader(true);     }      public function _initdb(){          $resource = $this->getpluginresource("db");         $db = $resource->getdbadapter();         $db->setfetchmode(zend_db::fetch_obj);          zend_db_table_abstract::setdefaultadapter($db);         zend_registry::set("db", $db);     } } 

in controller i'm doing following operation (which working when not connecting db):

class indexcontroller extends zend_controller_action {      public function init()     {         $access_token=$this->getfrontcontroller()->getrequest()->getheader('authorization');         if(isset($access_token)){             $access_token = str_replace ( "bearer ", "", $access_token);             $db=zend_registry::get("db");             $token= $db->fetchrow("select * dbo.wsoauth2 atoken='".$access_token."'");             if($token!=false){                 //perform action required enter right app                 $link= $db->fetchrow("select * dbo.wsapp appid='".$token->app_id);                 header("authorization: bearer ".$access_token);                 header("location: ".$this->getfrontcontroller()->getbaseurl()."/webservice");             } else {                 //let other stuff controller take place             }         }    }      public function indexaction()     {         $appid = $this->getrequest()->getparam('appid');         $this->view->appid= $appid;      } } 

well after long code paste have error show you, deosn't make sense me immagine i'm sissing (i don't use zend framework time obvious am):

 fatal error: uncaught exception 'zend_config_exception' message 'section 'development' cannot found in /usr/local/zend/apache2/htdocs/project/application/configs/application.ini' 

the section "development" in front of eyes in first code paste.. i'm quite confused. can help?

delete , add spaces again in [development : production]

sometimes happens accident non breaking space u+00a0 in front or after : , zend framework goes nuts. example, on osx pressing alt+space insert non breaking space , won't notice it.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

angularjs - ng-repeat duplicating items after page reload -