PEAR DB Oracle woes

From: Date: Thu, 29 Jul 2004 20:38:31 +0000
Subject: PEAR DB Oracle woes
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13922@lists.php.net to get a copy of this message
Linux RH 9.0 PEAR 1.3.2 DB 1.6.5 PHP 4.3.8 (compiled with both 'with-Oracle' and 'with-Oci8') Oracle 8i In connecting to a networked Oracle 8i database, PHP's method 'ocilogon' seems to work just fine. I'm trying to move app over to use PEAR::DB, but I'm having trouble connecting. (I've googled on this problem all day before I come to this list) This works in PHP (without PEAR) just fine: _______________________________ $db = "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 123.456.78.90)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = CLEAR) ) )"; $con = ocilogon("login", "password",$db); #success.... _______________________________ but I can't get the correct connect string using PEAR I'm trying something about like this: require_once 'DB.php'; ; ; $db = "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 123.456.78.90)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = CLEAR) ) )"; $user = 'abc'; $pass = 'xyz'; $host = '192.168.40.33:1521'; $dsn = "oci8://$user:$pass@$host/$db"; $db = DB::connect($dsn); _______________________________ I've tried many many variations on all the above values. but this error always comes back: [nativecode=ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor] ** oci8://.... So what am I doing wrong in my connection??? HELP TIA Scott

« previous php.pear.general (#13922) next »