Re: Connecting to Oracle
| From: | Brian.J.Mauter | Date: | Wed, 14 Mar 2001 03:19:21 +0000 |
| Subject: | Re: Connecting to Oracle | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-7432@lists.php.net to get a copy of this message | ||
Hey, I'm using Oracle with PHP. I never could get the blasted thing to
work right. What I ended up doing was something similar to this:
$db =
"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.68.10.1)(PORT=1521))(CONNECT_DATA=(SID=TEST)))";
$conn = OCILogon("scott", "tiger", $db);
From what I can tell, this completely lets PHP ignore your tnsnames.ora
file. So if you're having some rather interesting trouble connecting with
environment variables, give that a shot. The only things you'll have to
replace are the SID and the IP address. :)
-Brian