[DB] DSN problems with Oracle
| From: | Jason K. Carter | Date: | Wed, 20 Aug 2003 20:23:52 +0000 |
| Subject: | [DB] DSN problems with Oracle | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7313@lists.php.net to get a copy of this message | ||
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. Is
there something I should change in my DSN connection string to help it
find the correct database on the server?
Thank you!
Jason :)