I am having difficulty connecting to a remote Oracle database using PEAR DB. Every time I run my code, I get a "no such database" error. Here is the code:
<?php
require_once 'DB.php';
$dsn="oci8://<username>:<pass>@<host_ip>:1521/<service name>";
$db = DB::connect($dsn);
if (DB::isError($db)) {
die ($db->getMessage());
}
?>
I can connect to the database fine using sqlplus and a tns name. Please let me know what I am doing incorrectly.
Thank you!
Jason 🙂