Re: PHP4 / WinNT 4 / Oracle 7.3 via ODBC

From: Date: Mon, 22 Jan 2001 07:40:19 +0000
Subject: Re: PHP4 / WinNT 4 / Oracle 7.3 via ODBC
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-5131@lists.php.net to get a copy of this message
Hi Carlos, I had the same problem with a configuration near yours. PHP4.04 WinNT4 IIS4 Oracle client 8.0 I've used OCI fonctions, because they work with Oracle client 8.0 (my data base is in Oracle 7.3.4.00 but it works well) Here is my PHP code : // You can find the connection string in the file tnsnames.ora, this is the only solution i've find to connect to my distant database $Connection="(DESCRIPTION = (ADDRESS = (PROTOCOL = ...)(HOST = ...)(PORT = ...))(CONNECT_DATA = (SID = ...)))"; // under Windows NT this file is under [Oracle Client]\Net80\Admin\Tnsnames.ora // This is a permanent connection $Oracle=OCIPLogon(user, passowrd, $Connection); // sample of query $Requete=OCIParse($Oracle, "select ALTI from POSTE order by COMMUNE"); // the ALTI field is store in the $Alti variable OCIDefineByName($Requete,"ALTI",&$Alti); // execute the query OCIExecute($Requete); // read all the rows while (OCIFetch($Requete)) { echo $Alti } Don't forget the line extention=php_oci8.dll in your PHP.ini if you work under Windows NT, with LINUX you must make your PHP with the OCI8 librairie i think... Maybe you can try to yse $Connection with Oracle = Oracle_Logon($User, $Password, $Connection); I've tried to use odbc_connect (ODBC was ok), but it doesn't work, i don't know why... Good luck Jean-Christophe Le Brun Météo-France CMIRNE/DET 03-88-40-42-46 jean-christophe.lebrun@meteo.fr

« previous php.windows (#5131) next »