I've just installed the Oracle Instant client using this:
show me that oci8 is enable
, but when I try to query that database I've got the following message:
$credentials = oci_connect('user', 'pw', 'IP_Address');
$query = oci_parse($credentials, 'SHOW TABLES');
$res = oci_fetch_array($query, OCI_ASSOC);
Warning: oci_connect(): ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA in /usr/local/reports/share/index.php on line 2
Warning: oci_parse() expects parameter 1 to be resource, boolean given in /usr/local/reports/share/index.php on line 3
Warning: oci_execute() expects parameter 1 to be resource, null given in /usr/local/reports/share/index.php on line 4
Warning: oci_fetch_array() expects parameter 1 to be resource, null given in /usr/local/reports/share/index.php on line 5
PS: I've copy the tnsnames.ora from the database server to the /etc/tnsnames.ora of the web server.
Any lead on how to troubleshoot would be welcome.