php-windows | 2001042
Date: 04/23/01
- Next message: Andrian Pervazov: "Re: [PHP-WIN] Authorization on IIS5 (PHP4; Win2k)"
- Previous message: Asendorf, John: "RE: [PHP-WIN] Help on IIS4.0 +Oracle"
- Maybe in reply to: Gu Weidong-a1923c: "[PHP-WIN] Help on IIS4.0 +Oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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:a1923c <email protected>]
> > Sent: Monday, April 23, 2001 2:54 AM
> > To: php-windows <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: php-windows-unsubscribe <email protected>
> > For additional commands, e-mail: php-windows-help <email protected>
> > To contact the list administrators, e-mail:
> > php-list-admin <email protected>
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe <email protected>
> For additional commands, e-mail: php-windows-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe <email protected> For additional commands, e-mail: php-windows-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andrian Pervazov: "Re: [PHP-WIN] Authorization on IIS5 (PHP4; Win2k)"
- Previous message: Asendorf, John: "RE: [PHP-WIN] Help on IIS4.0 +Oracle"
- Maybe in reply to: Gu Weidong-a1923c: "[PHP-WIN] Help on IIS4.0 +Oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

