title: Fatal error: Uncaught exception 'Zend_Db_Table_Exception'
body: <p>I am using zend1.12. I placed index.php from public to root folder and changed configuration after that it is throwing below error.</p>
  
  <p>I am getting following error , all configuration looks fine.</p>
  
  <pre><code>Fatal error: Uncaught exception 'Zend_Db_Table_Exception' with message 'No adapter found for Application_Model_Content' in /var/www/html/library/Zend/Db/Table/Abstract.php:756 Stack trace: #0 /var/www/html/library/Zend/Db/Table/Abstract.php(740): Zend_Db_Table_Abstract-&gt;_setupDatabaseAdapter() #1 /var/www/html/library/Zend/Db/Table/Abstract.php(269): Zend_Db_Table_Abstract-&gt;_setup() #2 /var/www/html/library/Zend/Db/Table.php(77): Zend_Db_Table_Abstract-&gt;__construct(Array) #3 /var/www/html/application/views/scripts/common/topnav.phtml(2): Zend_Db_Table-&gt;__construct() #4 /var/www/html/library/Zend/View.php(108): include('/var/www/html/a...') #5 /var/www/html/library/Zend/View/Abstract.php(888): Zend_View-&gt;_run('/var/www/html/a...') #6 /var/www/html/application/layouts/scripts/front_header.phtml(29): Zend_View_Abstract-&gt;render('common/topnav.p...') #7 /var/www/html/library/Zend/View.php(108): include('/var/www/html/a...') #8 /var/www/html/library/Zend/View/Abstract.php(888): Zend_View-&gt;_run('/var/www/html/a...') #9 /var/www/ in /var/www/html/library/Zend/Controller/Plugin/Broker.php on line 336
  </code></pre>
  
  <p>Below is application/configs/applicatio.ini file</p>
  
  <pre><code>[production]
  phpSettings.display_startup_errors = 1
  phpSettings.display_errors = 1
  includePaths.library = BASE_PATH "/library"
  bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
  bootstrap.class = "Bootstrap"
  appnamespace = "Application"
  resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
  resources.frontController.params.displayExceptions = 1
  
  resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
  
  resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
  resources.frontController.baseUrl = "/"
  
  resources.session.remember_me_seconds = 864000
  
  [staging : production]
  
  [testing : production]
  phpSettings.display_startup_errors = 1
  phpSettings.display_errors = 1
  resources.db.adapter = "PDO_MYSQL"
  resources.db.params.host = "localhost"
  resources.db.params.username = "root"
  resources.db.params.password = "root123"
  resources.db.params.dbname = "labs"
  resources.db.isDefaultTableAdapter = true
  
  [development : production]
  phpSettings.display_startup_errors = 1
  phpSettings.display_errors = 1
  resources.frontController.params.displayExceptions = 1
  
  resources.db.params.profiler.enabled = true
  resources.db.params.profiler.class = Zend_Db_Profiler_Firebug
  </code></pre>
  
  <p>/index.php</p>
  
  <pre><code>&lt;?php
  date_default_timezone_set('Indian/Mahe');
  // Define path to application directory
  define('BASE_PATH', realpath(dirname(__FILE__)));
  
  defined('APPLICATION_PATH')
     || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));
  
  // Define application environment
  defined('APPLICATION_ENV')
      || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing'));
  
  
  // Include path
  set_include_path(
      BASE_PATH . '/library' 
     /*. PATH_SEPARATOR . '../Zend' */   
      . PATH_SEPARATOR . get_include_path()
  );
  
  /** Zend_Application */
  require_once 'Zend/Application.php';
  // Create application, bootstrap, and run
  
  $application = new Zend_Application(
      APPLICATION_ENV,
      APPLICATION_PATH . '/configs/application.ini'
  );
  $application-&gt;bootstrap()
              -&gt;run();
  Zend_Db_Table::getDefaultAdapter();
  </code></pre>
  
  <p>/application/bootstrap.php</p>
  
  <pre><code>&lt;?php
  
  class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
  {    
      protected function _initMyDb() {
  
      $this-&gt;bootstrap('db');
      $resource = $this-&gt;getPluginResource('db');
      $db = $resource-&gt;getDbAdapter();
  
     //$db-&gt;query('SET CHARACTER SET \'UTF8\'');
  }
  
  protected function _initRegistry()
  {
      $this-&gt;bootstrap('db');
      $db = $this-&gt;getResource('db');
     // $db-&gt;query("SET NAMES 'utf8'");
  }
  }
  </code></pre>