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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:57:23+00:00 2026-05-26T06:57:23+00:00

I have these values in my application.ini [production] ; Database; resources.db.adapter = pdo_mysql resources.db.params.host

  • 0

I have these values in my application.ini

[production]
; Database;
    resources.db.adapter = "pdo_mysql"
    resources.db.params.host = "localhost"
    resources.db.params.username = "user1"
    resources.db.params.password = "password1"
    resources.db.params.dbname = "projects__01"


;Names
    website.settings.websiteName = "My website 1"
    website.settings.websiteUrl = "http://www.mydomain1.com"
    website.settings.title = "mydomain.com - mydomain"
    website.settings.titleSeperator = " - "


[staging : production]
; Database;
    resources.db.adapter = "pdo_mysql"
    resources.db.params.host = "localhost"
    resources.db.params.username = "user2"
    resources.db.params.password = "password2"
    resources.db.params.dbname = "projects__02"

;Exceptions
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    resources.frontController.params.displayExceptions = 1

;Title and url
    website.settings.websiteName = "My website 2"
    website.settings.websiteUrl = "http://www.mydomain2.com"


[development : staging]
;Database
    resources.db.adapter = "pdo_mysql"
    resources.db.params.host = "localhost"
    resources.db.params.username = "user3"
    resources.db.params.password = "password3"
    resources.db.params.dbname = "projects__03"


;Title and url
    website.settings.websiteName = "My website 3"
    website.settings.websiteUrl = "http://www.mydomain3.com"

The problem is all database and exception values work properly, meaning that they are inheriting properly as they are supposed to

But the values I have set for Title and url do not inherit properly, only the first defined ones are used.

Why is this? is this by design? are only predefined/standard environment values such as database and exceptions are inherited?

Or am I making a mistake somewhere?

  • 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-26T06:57:23+00:00Added an answer on May 26, 2026 at 6:57 am

    Okay, from your comment it sounds like you are creating a new Zend_Config object in the bootstrap, putting this in the registry, and it’s this that’s not returning what you’d expect. If this is the case I’m guessing that you’ve omitted the second parameter on the config object, so you have something like this:

    $config = new Zend_Config_Ini(APPLICATION_PATH.'/configs/application.ini');
    

    but what you should have is more like this:

    $config = new Zend_Config_Ini(APPLICATION_PATH.'/configs/application.ini', APPLICATION_ENV);
    

    the second param tells it what section of the config file to use, without that it will always get the same value.

    However, you don’t actually need to re-parse the config file since Zend Application has done this already. Instead you can access the options from the bootstrap class and use these to create an object (or just store the options in their existing array format):

    protected function _initConfig()
    {
        $config = new Zend_Config($this->getOptions());
        Zend_Registry::set('config', $config);
    
        return $config;
    }
    

    and this should work as you expect.

    If my guess was wrong, please can you edit your question to include the relevant part of your bootstrap where the config object is created and stored in the registry.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a field in my database that contain comma separated values these values
I have a application which requires the user to input some values. From these
I have a need to display many numerical values in columns. These values need
Imagine I have these python lists: keys = ['name', 'age'] values = ['Monty', 42,
I have an IDictionary, now I want to use these values in a selectlist.
well i have this messages table with sample values like these: msg_id recipient_id read
Consider the scenario I have values assigned like these Amazon -1 Walmart -2 Target
I have a set of five boolean values. If more than one of these
I have a rails model that validates uniqueness of 2 form values. If these
I have a database table full of time points and experimental values at those

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.