I have installed Zend Server 6.1.0 (PHP 5.4.16 - Apache 2.2.22) on a Win 2012 64 bit server. I need to connect both to a local Oracle 12c (64 bit) server, and to a remote Oracle DB.
Zend Server already contains Oracle client libraries (orannzsbb11.dll, oraocci11.dll, oraociei11.dll, orasql11.dll) and I am able to connect to both the local Oracle DB and the remote one, but only using the full connect identifier inside the PHP script, e.g.
$tns = "(DESCRIPTION =
(ADDRESS=(PROTOCOL = TCP)(HOST = XXX0001)(PORT = 1521))
(CONNECT_DATA=(SERVER = DEDICATED)(SID = ORAXXX)))";
$c = oci_connect("XXXX", "XXXX", $tns);
What I would like is to go through the tnsnames.ora file. I tried installing the full 32 bit Oracle client and also the 32 bit Instant client, but I was not able to make PHP go through the tnsnames.ora. I have set the PATH variable to contain the client libraries in front, and also tried setting the TNS_ADMIN env var, but I was not able to make PHP see the tnsnames.ora.
Do you know how I should set up things to make it work?
Thanks!