Hi,

Use the OCI functions with the TNS like it is in your
tnsnames.ora file (C:\ORAWIN\NETWORK\ADMIN\TNSNAMES.ORA):

<?php
putenv("ORACLE_SID=databasename");
putenv("ORACLE_HOME=C:\ORAWIN");
$tns = "(DESCRIPTION = (ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST =
oracleserver)(PORT = 1521)))
    (CONNECT_DATA = (SID = databasename) ) )";
$Conn=OCIPLogon("user","password",$tns) or die("Can not connect to Oracle");
?>

It works with all Oracle versions I´ve tried.

Bye

Carlos

> > -----Original Message-----
> > From: Gu Weidong-a1923c [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, April 23, 2001 2:54 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Help on IIS4.0 +Oracle
> > 
> > 
> > Is it must to have Oracle 8.1.6 client installed with IIS to 
> > access Oracle using OCI?
> > I try to connect the database but got " _oci_open_server: 
> > ORA-12154: TNS:could not resolve service name" with 8.0.5 
> > client installed. ( I can use the same TNS name to connect 
> > the DB in SQL*PLUS)
> > 
> > 
> > Weidong
> > 
> > Regards
> > 
> > 
> > -- 
> > PHP Windows 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 Windows 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 Windows 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