在我的项目中,我试图让Zend框架与Oracle一起工作。 Apache在Windows下启动。
以下是我收到的错误消息:
An error occurred
Application error
Exception information:
Message: SQLSTATE[HY000]: General error: 942 OCIStmtExecute: ORA-00942: table or user representation not exists (ext\pdci\oci_statement.c:14
Stack trace:
#0 C:\Apache\htdocs\library\Zend\Db\Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 C:\Apache\htdocs\library\Zend\Db\Adapter\Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 C:\Apache\htdocs\library\Zend\Db\Adapter\Pdo\Abstract.php(23: Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Table_Select), Array)
#3 C:\Apache\htdocs\library\Zend\Db\Table\Abstract.php(1529): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Table_Select))
#4 C:\Apache\htdocs\library\Zend\Db\Table\Abstract.php(1344): Zend_Db_Table_Abstract->_fetch(Object(Zend_Db_Table_Select))
#5 C:\Apache\htdocs\application\controllers\CompaniesController.php(12): Zend_Db_Table_Abstract->fetchAll()
#6 C:\Apache\htdocs\library\Zend\Controller\Action.php(516): CompaniesController->indexAction()
#7 C:\Apache\htdocs\library\Zend\Controller\Dispatcher\Standard.php(295): Zend_Controller_Action->dispatch('indexAction')
#8 C:\Apache\htdocs\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#9 C:\Apache\htdocs\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch()
#10 C:\Apache\htdocs\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#11 C:\Apache\htdocs\public\index.php(56): Zend_Application->run()
#12 {main}
Request Parameters:
array (
'controller' => 'companies',
'action' => 'index',
'module' => 'default',
)
这是我的配置:
resources.db.adapter = PDO_OCI
resources.db.params.username = username
resources.db.params.password = paswd
resources.db.params.dbname = "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = alps)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = my.SERVICE.NAME) ) )"
TNS是正确的
答案 0 :(得分:1)
问题解决了。表名必须用UPPER case
编写