Re: PHP + Oracle

From: Dan Hopkins <dan_at_ukonline.net>
Date: Fri, 31 Mar 2000 12:57:11 +0000
Message-ID: <38E4A0A7.68B0E65A_at_ukonline.net>


Frerotte Cyrille wrote:
>
> I don't know how to use PHP functions to access to a remote database from my
> Apache web server with PHP. When I use OCILogon or Ora_Logon, I can't
> connect to the database.
> I don't have oracle on my web server, only the net8 librairies.
>
> I hear about the file "tnsnames.ora" but i can't find on the web any
> documentation in order to configure this with PHP.
>
> Anyone can help me?

Can you connect to the db from sqlplus (I only use Oracle 7 .... but I presume 8 has a similar cmdline sql tool?) on the webserver? Have you tried setting the relevant environment variables in your script?

eg

putenv("ORACLE_HOME=<wherever>");
putenv("ORACLE_SID=<whatever>");

(again I'm quoting for oracle 7... hope it's of some use)

-- 
Dan Hopkins
Received on Fri Mar 31 2000 - 14:57:11 CEST

Original text of this message