Using Oracle Driver with Zend Framework

Spent far too much time fiddling around with configuration options to get this to work.

In your application.ini file, you will need something that looks like this.

  1. resources.db.adapter = Oracle
  2. resources.db.params.username = myusername       
  3. resources.db.params.password = mypassword
  4. resources.db.params.dbname = my.host.name.com:portnumber/mydbinstance

notice that you don’t need a “resources.db.paramas.host” line here. The “mydbinstance” part comes from your tnsnames.ora file…

  1. mydbinstance =
  2.   (DESCRIPTION =
  3.     (ADDRESS = (PROTOCOL = TCP)(HOST = my.host.name.com)(PORT = 1771))
  4.     (CONNECT_DATA =
  5.       (SERVER = DEDICATED)
  6.       (SERVICE_NAME = mydbinstance)
  7.     )
  8.   )

Hope this saves someone some time!