cakephp/cakephp — pull request #1188 by Gared (2013-03-20 09:54:58+00:00)
Title: Add support for oracle database

This will add support for oracle databases. It's nearly the same code as pasted on this page: http://snipt.org/zKib2.

Tested with:
Client: Windows 32-bit, PHP 5.4.4, cakephp 2.3.1, OCI instantclient-basic-nt-11.2.0.3.0
Database server: Oracle 10g

You have to install OCI (Oracle Instant Client), enable the php extensions "php_oci8" and "php_pdo_oci" and change your database config.
Here is an example of it:

`public $default = array(
'datasource' => 'Database/Oracle',
'driver' => 'oracle',
'connect' => 'oci_connect',
'persistent' => false,
'host' => 'oracle-server',
'port' => '1521',
'login' => 'login',
'password' => 'password',
'database' => '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP) (HOST=oracle-server)(PORT = 1521))) (CONNECT_DATA =(SID = mysid)(SERVER = DEDICATED)))',
'prefix' => ''
);`

There is one problem if you use caching: The 'database' string from the database config is used as a part of the name of the caching file. On windows I get multiple errors, because SPL has problems with several underscores somehow. I added a new value in the config file called 'alias' and replaced the part of the caching file name with it and it works, but this was a workaround only. What would you suggest is the best way to fix this issue?