Brian,

Thanks for the solution, that is a good one.

I imagine you can set the environment variable oracle_sid this way also.
ORACLE_SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.68.10.1)(PORT=1521)
)(CONNECT_DATA=(SID=TEST)))

re: TNSNAMES.ORA

It seems to be a fairly common occurence where a tnsnames.ora file is
transferred to a linux box from a dos box.  This transferrence sometimes
does not perform a text file conversion on the tnsnames.ora file.

That being the case, the lines are terminated with <CR><LF> (carriage return
and line feed) characters.  Oracle on Linux does not like this.

If that is the case, when you use vi and examin the file, it should tell you
it is a dos file.
type ":set ff=unix" and ":x" to save and exit will convert the file.

The other thing to keep in mind is that the user "nobody" or whomever user
your webserver runs as, has permissions to the TNSNAMES.ORA file, including
all directories leading up to the TNSNAMES.ORA file.



""Brian.J.Mauter"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to