Hi thanks ALAN and SCS for your advices.  I tried them both and both
solutions got rid of the $config ERROR-1 problem.
However there's still an ERROR-2 problem on the view page.  How do I fix
this?

*View page* - ERROR-2
http://pastebin.com/m1d64e74a

application/configs/*application.ini* - 2
http://pastebin.com/m4c2fd8a3

*Bootstrap-2*
http://pastebin.com/m2c247624


/apprentice

_______________________________________________________________________

ALAN wrote>>>

Hi,The error is about $config as it doesn't exist in the _initRegDatabase()
> method.  I would suggest adding a "protected $_config" variable to your
> Bootstrap class then in your _initRegConfig() method, change it to:
> "$this->_config = new Zend_Config..."
>
> Then in your _initRegdatabase() function you can use:
>
> "$db = Zend_Db::factory($this->_config->db);"
>
> That should solve the problem.
>
> Alan.
>
>
_______________________________________________________________________


SCS wrote>>>

I think you should a line for getting the $config from the registry:
>
> $config = Zend_Registry::get('config');
>
> your function:
>
>         protected function _initRegDatabase()
>         {
>
>                         /*add this line*/ $config =
> Zend_Registry::get('config');
>
>                         $db = Zend_Db::factory($config->db);
>                 Zend_Db_Table_Abstract::setDefaultAdapter($db);
>                 Zend_Registry::set('db', $db);
>         }
> scs
>

Reply via email to