2011年2月21日星期一

[fw-db] plugging oracle in to my zend app

Hello all,

I have written my application to speak with a mySql database. My
understanding of the framework is that it conveniently wraps all the backend
calls and should allow me to simply change some configuration settings in
order to change databases.

I presume this is done in the application.ini file where I previously had
(currently commented out)

;resources.db.adapter = PDO_MYSQL
;resources.db.isDefaultTableAdapter = true
;resources.db.params.charset = "utf8"
;resources.db.params.host = "localhost"
;resources.db.params.username = "root"
;resources.db.params.password = ""
;resources.db.params.dbname = "taw"

I have used this as a guide to pointing to my newly installed Oracle
database (with a new user "myUser")

resources.db.adapter = PDO_OCI
resources.db.params.port = "8081"
resources.db.isDefaultTableAdapter = true
resources.db.params.charset = "utf8"
resources.db.params.host = "localhost"
resources.db.params.username = "myUser"
resources.db.params.password = "myPassword"
resources.db.params.dbname = "xe"

I have also uncommented the following line in my php config file:
extension=php_pdo_oci.dll

As soon as I log in to my application I get the error:

Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]:
pdo_oci_handle_factory: ORA-12537: TNS:connection closed
(ext\pdo_oci\oci_driver.c:579)' in
C:\xampp\htdocs\TAW\library\Zend\Db\Adapter\Pdo\Abstract.php:129

I understand that this could be an Oracle configuration issue, I just want
to rule out the possibility of the problem being on the application side.

Note that my application works fine when connecting to the mySql database.
All params seem to be correct, as well.

Does anyone have any suggestions?

Thanks!
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/plugging-oracle-in-to-my-zend-app-tp3318114p3318114.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: