Pear oci8 DB issue
| From: | viper at 2ghz dot net | Date: | Wed, 25 Jun 2003 19:39:45 +0000 |
| Subject: | Pear oci8 DB issue | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-6235@lists.php.net to get a copy of this message | ||
Hi,
I am having a very odd issue with PEAR and oci8. I am able to connect to the
DB while using straight oci8 commands but when I use pear I recive this error:
-24
[nativecode=ORA-12514: TNS:listener could not resolve SERVICE_NAME given in
connect descriptor ] ** oci8://user:userpass@localhost/testdb
DB Error: connect failed
here is the code I am using:
require_once( 'DB.php' );
$dbuser = "user";
$dbpass = "userpass";
$dbhost = "localhost";
$dbname = "testdb";
$db_handle = DB::connect( "oci8://user:userpass@localhost/testdb" );
if
(DB::isError($db_handle))
{
print
$db_handle->getCode()."<br>\n";
print
$db_handle->getDebugInfo()."<br>\n";
die
($db_handle->getMessage());
}
// close connection
$db_handle->disconnect();
?>
any help would be greatly appreciated I am banging my head against a stone wall
with this one. Thanks.
-=>Adam<=-
-----------------------------------------
http://www.2ghz.net/
Welcome To the Future