Re: Oracle OCILogon succeeds, but DB::connect() fails

From: Date: Wed, 04 Sep 2002 14:38:22 +0000
Subject: Re: Oracle OCILogon succeeds, but DB::connect() fails
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2241@lists.php.net to get a copy of this message
Hi, Darren, Just yesterday I was trying to do the same thing. That is what I found out. To connect to Oracle database from PEAR you have to use the same syntax you're using in, say, sqlplus. So, your example will looks like: $db = DB::connect("oci8://user:pass@db_name"); where db_name is your TNSNAMES (like ORA1). Hope this helps. Victor. Darren Nickerson wrote:
Folks, While the following hand-cranked php works just fine: $iDBConn = OCILogon(DB_USER, DB_PASS, DB_NAME); I cannot get Pear to connect. I'm trying: $db = DB::connect( "oci8://DB_USER:DB_PASS/DB_NAME" ); and it fails miserably.
        if (DB::isError($db)) {
                die($db->getMessage());
        }
gives me the following message: DB Error: connect failed Any hints from the ORACLE gurus? -Darren


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