RES: [PHP-DB] Oracle 7 + ODBC + PHP4 + NT?
| From: | Carlos Correa Goncalves | Date: | Fri, 27 Apr 2001 15:23:37 +0000 |
| Subject: | RES: [PHP-DB] Oracle 7 + ODBC + PHP4 + NT? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-8948@lists.php.net to get a copy of this message | ||
Hi,
I´m using Oracle 7 + PHP4 + NT with OCI functions, without ODBC. It works
fine and it works faster.
Use the OCI functions (see the html help) with the TNS like it is in your
tnsnames.ora file (C:\ORAWIN\NETWORK\ADMIN\TNSNAMES.ORA):
<?php
putenv("ORACLE_SID=sidname");
putenv("ORACLE_HOME=C:\ORAWIN");
$tns = "(DESCRIPTION = (ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST =
oracleserver)(PORT = 1521)))
(CONNECT_DATA = (SID = sidname) ) )";
$Conn=OCIPLogon("user","password",$tns) or die("Can not connect to
Oracle");
?>
Bye
Carlos
> ----- Mensagem original -----
> De: David Harbud [SMTP:david@chaseits.co.uk]
> Enviada em: sexta-feira, 27 de abril de 2001 12:18
> Para: 'php-db@lists.php.net'
> Assunto: [PHP-DB] Oracle 7 + ODBC + PHP4 + NT?
>
> I've had no great joy in getting PHP4 to connect to Oracle using native
> drivers. Can anybody point me in the direction of php_odbc.dll and,
> ideally, instructions for getting connected via ODBC? If necessary, we
> could live with using PHP3, if this is easier.
>
>
> David Harbud
> Chase Information Technology Services Limited
> 83/85 Mansell Street
> London
> E1 8AN
>
> Tel: +44 (0)20 7459 3826
> Fax: +44 (0)20 7459 3801
> E-mail: david@chaseits.co.uk
>
>