Hi, I have successfully compiled PHP5 with the oracle10g Instant client. now I'm having problems connexting to the database...
Here is my connection string (db.php)
<?php
ini_set("TNS_NAMES","/etc/oracle");
ini_set("TNS_ADMIN","/etc/oracle");
apache_setenv("ORACLE_SID","rmsprod");
apache_setenv("TNS_ADMIN","/etc/oracle");
oci_connect("username","password","SERVICE");
?>
Here is my tnsnames.ora file
SERVICE=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server.host.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = service)
)
)
I keep getting the following error:
Warning: oci_connect() [function.oci-connect]: _oci_open_server: ORA-12154: TNS:could not resolve the connect identifier specified in /PATH/TO/db.php on line 7
Do I need to be setting the ORACLE_SID environment variable? I'm lost
Any help appreciated