Re: Oracle OCILogon succeeds, but DB::connect() fails
| From: | Arnaud Limbourg | Date: | Fri, 23 Aug 2002 23:34:44 +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-2180@lists.php.net to get a copy of this message | ||
> 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?
I don't now oracle that much but looks to me that the DSN is wrong, something like
$db = DB::connect( "oci8://DB_USER:DB_PASS@LOCALHOST/DB_NAME" );
would me more correct imho. Maybe you just retyped it too fast here ;))
Also, try
$db->getUserInfo();
$db->getDebugInfo();
to see if you get the native error code.
Regards,
Arnaud.