title: change value of application.ini parameters in zend framework
body: <p>I am working on Zend Framework and using module based structure with multiple databases.</p>
  
  <p>I am using multiple databases through multidb approach in <strong>application.ini</strong></p>
  
  <p>My <strong>application.ini</strong> looks like</p>
  
  <pre><code>resources.multidb.primary.adapter = PDO_MYSQL
  resources.multidb.primary.host = localhost
  resources.multidb.primary.username = root
  resources.multidb.primary.password = 123456
  resources.multidb.primary.dbname = tubaah_zend
  resources.multidb.primary.default = true
  
  resources.multidb.secondary.adapter = PDO_MYSQL
  resources.multidb.secondary.host = localhost
  resources.multidb.secondary.username = root
  resources.multidb.secondary.password = 123456
  resources.multidb.secondary.dbname = tubaah
  </code></pre>
  
  <p>I want to set multidb.primary.default and multidb.secondary.default values on fly so that I can use different databases for different modules.</p>
  
  <p>I tried using the code mentioned in <a href="http://framework.zend.com/manual/en/zend.config.theory_of_operation.html" rel="nofollow">http://framework.zend.com/manual/en/zend.config.theory_of_operation.html</a> . </p>
  
  <p>The code snippet is as following :-</p>
  
  <pre><code>$config = new Zend_Config_Ini(APPLICATION_PATH. '/configs/application.ini', 'development', array('allowModifications' =&gt; true));
  $config-&gt;resources-&gt;multidb-&gt;primary-&gt;default = 0;
  $config-&gt;resources-&gt;multidb-&gt;secondary-&gt;default = 1;
  </code></pre>
  
  <p>But it is not working.</p>
  
  <p>Please help me.</p>