HI,
I use this PHP call to open an Oracle db connection:

ora_logon("sr_tst@ORATEST" , "sr_tst")

where user=password=sr_tst and service name is ORATEST .

My tnsnames.ora contains:

ORATEST =
   (DESCRIPTION =
       (ADDRESS =
          (PROTOCOL = TCP)
          (Host = offida)
          (Port = 1525)
        )
    (CONNECT_DATA =
       (SID = ORATEST)
    )
  )

Thanks

Giuliano

Sebastian Stadtlich wrote:

> hi
>
> did you specify the third 'optional' parameter?
> OCILogon (string username, string password [, string db])
>
> db should be your tnsname
> on windows i could not make it without that parameter.
> it should be set as enviroment variable ORACLE_SID,
> but that did not work for me on win( it does on linux )
> despite that no further configuration was needed by me after installing
> the
> oracle client
>
> sebastian
>
> > -----Ursprungliche Nachricht-----
> > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im
> > Auftrag von Parisi Giuliano
> > Gesendet: Dienstag, 10. Juli 2001 17:10
> > An: [EMAIL PROTECTED]
> > Betreff: [PHP] Access to oracle db
> >
> >
> > Hi,
> > I've installed Apache server and PHP interpreter on Microsoft Windows
> > platform. I'm trying to access to Oracle db without results (I've
> > installed Oracle client and configured tnsnames.ora file). PHP
> > interpreter return following error:
> >
> > Oracle: Connection Failed: ORA-12154: TNS:could not resolve
> > service name
> > in ...
> >
> > I think that Oracle client used by PHP doesn't find tnsnames.ora file
> > (I've tryied to move tnsnames.ora file from installation folder to
> > another folder and error message doesn't change).
> > sqlplus utility, that used the same tnsnames.ora file,
> > correctly access
> > to oracle db without problem .
> > The question is: how can I configure PHP to enable access to oracle db
> > via oracle client ?
> > Thanks in advantage for any suggestion.
> > Regards
> >
> > Giuliano
> >
> >
> >
> > --
> > PHP General 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