Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: problem with ora_logon, Oracle8i, PHP4. HELP ME please!!!

Re: problem with ora_logon, Oracle8i, PHP4. HELP ME please!!!

From: iubito <12345_at_meloo.com>
Date: 19 Apr 2002 00:44:25 -0700
Message-ID: <7bed637a.0204182344.4fea54e1@posting.google.com>


Hi !

Here's my $ORACLE_HOME/network/admin/tnsnames.ora : # TNSNAMES.ORA Network Configuration File: /home/oracle/app/oracle/product/8.1.7/network/admin/tnsnames.ora # Generated by Oracle configuration tools.

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)

    )
  )

LOG8_NT9=
(DESCRIPTION =
    (ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.100.59)(PORT=1521))
    )
    (CONNECT_DATA =
(SID = log8)

    )
)
is it correct ?



And now my php script :
line 1 :<HTML><BODY><PRE>
line 2 :<?
...
line 6 :$c1 = ora_logon("m_test_at_log8_nt9","m_test"); ...?>...

and the result in browser :
Warning: Oracle: Connection Failed: Error while trying to retrieve text for error ORA-12154
 in /home/httpd/html/test2.php on line 6

In a telnet session on this machine, with user "oracle" I can run sqlplus m_test/m_test_at_log8_nt9
but with user "root" I can't...

When I open a page, which user try to connect : root, oracle, or another ?
and are there specific environment vars to set up ?

Regards,
Sylvain

Sybrand Bakker <postbus_at_sybrandb.demon.nl> wrote in message news:<9beubug67l473m822ghchtp6bd5686lede_at_4ax.com>...

> On 18 Apr 2002 13:09:25 -0700, 12345_at_meloo.com (iubito) wrote:
> 
> >Hi everybody!
> >
> >I've a big problem with ora_logon("user_at_10.10.100.100",$password).
> >The error is about TNS names, ORA-12154.
> >Oracle works properly (sql*plus...), and I manage to connect a
> >database but with PHP it doesn't work.
> >I've try a lot of things, modify
> >$ORACLE_HOME/network/admin/tnsnames.ora, environment vars for all
> >users of the Linux box... Nothing :(
> >
> >Have you an idea to help me?
> >Thanks,
> >Sylvain
> 
> 10.10.100.100 isn't a valid servicename at all.
> Specify a servicename in your code which occurs in your tnsnames.ora.
> This is exactly what the error was saying, and evidently you didn't
> look it up or tried to understand the error explanations.
> 
> Regards
> 
> Sybrand Bakker, Senior Oracle DBA
> To reply remove -verwijderdit from my e-mail address
Received on Fri Apr 19 2002 - 02:44:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US