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 7443545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:20:49+00:00 2026-05-29T11:20:49+00:00

This is the code I have in Bootstrap: public function _initRegistry() { $systemConfigModel =

  • 0

This is the code I have in Bootstrap:

public function _initRegistry()
{
    $systemConfigModel = new Application_Model_DbTable_SystemConfig();
    Zend_Registry::set('config', $systemConfigModel->getSystemConfig());
}

And this an exception I am getting:

( ! ) Fatal error: Uncaught exception 'Zend_Db_Table_Exception' with message 'No adapter found for Application_Model_DbTable_SystemConfig' in /usr/share/php5/Zend/Db/Table/Abstract.php on line 755
( ! ) Zend_Db_Table_Exception: No adapter found for Application_Model_DbTable_SystemConfig in /usr/share/php5/Zend/Db/Table/Abstract.php on line 755

It works just fine if I call it within my BaseController. It just looks like the PDO adapter that I specify in application.ini has not been initialized at the time Bootstrap is executed (strange?). What should I do to make the code work in Bootstrap? Is it necessary to create and set an adapter with Zend_Db_Table::setDefaultAdapter();?

I am asking because if the code is not in Bootstrap, it needs to be duplicated in two different places and it also kind of looks like it belongs to Bootstrap.

  • 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-29T11:20:49+00:00Added an answer on May 29, 2026 at 11:20 am

    You are correct, during bootstrap, the Zend Application resource for your database has not yet been initialized.

    Try changing your bootstrap method as follows so you explicitly bootstrap the db resource.

    public function _initRegistry()
    {
        $this->bootstrap('db'); // Bootstrap the db resource from configuration
    
        $db = $this->getResource('db'); // get the db object here, if necessary
    
        // now that you have initialized the db resource, you can use your dbtable object
        $systemConfigModel = new Application_Model_DbTable_SystemConfig();
        Zend_Registry::set('config', $systemConfigModel->getSystemConfig());
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have this code: var myArray = new Object(); myArray["firstname"] = "Bob"; myArray["lastname"]
Imagine I have this code: var myFunc1 = function(event) { alert(1); } var myFunc2
Say I have this code - public interface ParentInterface1 { public List<? extends ChildInterface1>
This is the code I have so far:- $db = $this->getInvokeArg('bootstrap')->getPluginResource('db')->getDbAdapter(); $sql = select
I wrote this code I have these errors Cannot implicitly convert type x.Program.TreeNode' to
So I have this code for these Constructors of the Weapon class: Weapon(const WeaponsDB
So I have this code that takes care of command acknowledgment from remote computers,
So I have this code in a google app engine template: <select name='voter'> {%
Hey I have this code right here: http://pastie.org/534470 And on line 109 I get
Say I have this code: #import <UIKit/UIKit.h> @interface MyView : UIView @end @implementation MyView

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.