Hi all,

Thanks a lot for the help!!  I´ve reinstalled Oracle Cliente (version
8.1.5.0.0) and PHP 4.0.4pl1 and tried Jean-Christophe suggestion, with
success:

----------
<?php
putenv("ORACLE_SID=badm");
putenv("ORACLE_HOME=D:\ORANT");
$tns = "(DESCRIPTION = (ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST =
bhz_oracle_1)(PORT = 1521)))  (CONNECT_DATA = (SID = badm) ) )";
$connect=OCIPLogon("user","password",$tns) or die("It's not possible to
connect");
$sql =  "select * from CentrosCusto";

$result = OCIParse($connect,$sql);
OCIExecute($result) or die("It's not possible to query");

echo("<TABLE>");
while(OCIFetch($result)) {
    $CC = OCIResult($result,1);
    $CCNome = OCIResult($result,2);
    echo('<TR><TD>' . $CC . '</TD><TD>' . $CCNome . '</TD></TR>');
}
echo("</TABLE>");
?>
-------------
Then let's start the real job...  I am in the game!

Bye


> ----- Mensagem original -----
> De:           Carlos Correa Goncalves 
> Enviada em:           Sexta-feira, 19 de Janeiro de 2001 13:53
> Para:         '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
> Assunto:              PHP4 / WinNT 4 / Oracle 7.3 via ODBC
> 
> Hi,
> 
> I´m using PHP 4.0.4pl1 with extension php_oracle.dll, Oracle client 7.3
> with the following products installed:
> -------------------------
> Call Interface 7.3.4.0.0
> Objects for OLE 2.2.1.0.0
> 32 bit ODBC 2.5.3.1.0B
> Support files 7.3.4.0.0
> SQL*Net Client 2.3.4.0.0
> ... and others
> ------------------------------
> 
> I´m trying to connect to an Oracle 7.3 database with ODBC functions or
> direct connection.  Those are the code:
> 
> ---------------
> putenv("ORACLE_SID=badm");
> putenv("ORACLE_HOME=C:\ORANT");
> putenv("TNS_ADMIN=C:\ORANT\NETWORK\ADMIN");
> 
> $connect = ora_logon("usercons@badm","sylkds");
> ----------------
> putenv("ORACLE_SID=badm");
> putenv("ORACLE_HOME=C:\ORANT");
> putenv("TNS_ADMIN=C:\ORANT\NETWORK\ADMIN");
> 
> $connect = odbc_connect("badm" ,"consulta","consulta");
> ---------------
> 
> Both are returning the following message from PHP:
> Warning: Oracle: Connection Failed: ORA-12154: TNS:could not resolve
> service name in oracle.php on line xxx
> Any suggestion?
> 
> 
> 
> 

--
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