mam problem z połączeniem się do bazy danych Postgres na Ubuntu 10.04.
Postgresa Plus instalowałem ze strony http://www.enterprisedb.com/products/postg...getinstaller.do .
Jak dla mnie

W postgresie mam bazę danych "zftutorial", właścicielem jest użytkownik "postgres" o haśle "xxx", nazwa hosta "localhost".
Staram się połączyć i pobrać dane przy pomocy Zend Framework.
application.ini
Kod
resources.db.adapter = PDO_PGSQL
resources.db.params.host = localhost
resources.db.params.username = postgres
resources.db.params.password = xxx
resources.db.params.dbname = zftutorial
resources.db.params.charset = utf8
resources.db.params.host = localhost
resources.db.params.username = postgres
resources.db.params.password = xxx
resources.db.params.dbname = zftutorial
resources.db.params.charset = utf8
kontroler
Kod
public function indexAction ()
{
// action body
$oSystemowa = new Wizytowki_Model_Systemowa();
$this->view->sOFirmie = $oSystemowa->fetchRow()->id;
}
{
// action body
$oSystemowa = new Wizytowki_Model_Systemowa();
$this->view->sOFirmie = $oSystemowa->fetchRow()->id;
}
widok
Kod
<?php echo $this->sOFirmie; ?>
błąd
Kod
#0 /var/www/instytut21/library/Zend/Db/Table/Abstract.php(739): Zend_Db_Table_Abstract->_setupDatabaseAdapter()
#1 /var/www/instytut21/library/Zend/Db/Table/Abstract.php(268): Zend_Db_Table_Abstract->_setup()
#2 /var/www/instytut21/application/controllers/OfirmieController.php(8): Zend_Db_Table_Abstract->__construct()
#3 /var/www/instytut21/library/Zend/Controller/Action.php(513): OfirmieController->indexAction()
#4 /var/www/instytut21/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('indexAction')
#5 /var/www/instytut21/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#6 /var/www/instytut21/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#7 /var/www/instytut21/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#8 /var/www/instytut21/public/index.php(26): Zend_Application->run()
#9 {main}
#1 /var/www/instytut21/library/Zend/Db/Table/Abstract.php(268): Zend_Db_Table_Abstract->_setup()
#2 /var/www/instytut21/application/controllers/OfirmieController.php(8): Zend_Db_Table_Abstract->__construct()
#3 /var/www/instytut21/library/Zend/Controller/Action.php(513): OfirmieController->indexAction()
#4 /var/www/instytut21/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('indexAction')
#5 /var/www/instytut21/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#6 /var/www/instytut21/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#7 /var/www/instytut21/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#8 /var/www/instytut21/public/index.php(26): Zend_Application->run()
#9 {main}