> Hi,
> 
> Could you please help me to correct this problem I'm getting while connecting to 
> oracle database from php program.
>  
> I have installed 
> 1) IIS 5.0 on WIN 2000
> 2) PHP 4.3.2 and 
> 3) Oracle Enterprise Edition and Oracle 8i client with Net8 configuarion.
> 
> I get an sql prompt upon entering the login and password as scott tiger.
> I am also able to run php programs through my browser.
> But when I try to connect to the oracle database through php prog, I get an error
> 
> The prog i run is:
> <?php
> $connection = Ora_Logon ("scott", "tiger");
> if ($connection == false){
> echo "Here is the returned value $connection";
> echo Ora_ErrorCode().": ".Ora_Error()."<BR>";
>  exit;
> }
> else 
> echo "Successful Logon\n"; 
> ?>
> 
> The output:
> Warning: Oracle: Connection Failed: in c:\inetpub\wwwroot\oratest.php on line 2
> Here is the returned value 0: 
> I ran it at the command prompt:
> C:\Inetpub\wwwroot>oratest.php
> <br /><b>Warning</b>:  Oracle: Connection Failed: ORA-12560: TNS:protocol adapter 
> error
>  in <b>C:\Inetpub\wwwroot\oratest.php</b> on line <b>2</b><br />
> Here is the returned value 12560: ORA-12560: TNS:protocol adapter error<BR>
> 
> 
> Here is the copy of tnsnames.ora and listener.ora file from dir 
> D:\oracle\ora81\network\ADMIN
> Listener.ora
> # LISTENER.ORA Network Configuration File: D:\oracle\ora81\network\admin\listener.ora
> # Generated by Oracle configuration tools.
> 
> LISTENER =
>   (DESCRIPTION_LIST =
>     (DESCRIPTION =
>       (ADDRESS_LIST =
>         (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
>       )
>       (ADDRESS_LIST =
>         (ADDRESS = (PROTOCOL = TCP)(HOST = S2-61-052-33051)(PORT = 1521))
>       )
>     )
>     (DESCRIPTION =
>       (PROTOCOL_STACK =
>         (PRESENTATION = GIOP)
>         (SESSION = RAW)
>       )
>       (ADDRESS = (PROTOCOL = TCP)(HOST = S2-61-052-33051)(PORT = 2481))
>     )
>   )
> 
> SID_LIST_LISTENER =
>   (SID_LIST =
>     (SID_DESC =
>       (SID_NAME = PLSExtProc)
>       (ORACLE_HOME = D:\oracle\ora81)
>       (PROGRAM = extproc)
>     )
>     (SID_DESC =
>       (GLOBAL_DBNAME = nitin.tcs)
>       (ORACLE_HOME = D:\oracle\ora81)
>       (SID_NAME = nitin)
>     )
>   )
> 
> 
> tnsnames.ora
> # TNSNAMES.ORA Network Configuration File: D:\oracle\ora81\network\admin\tnsnames.ora
> # Generated by Oracle configuration tools.
> 
> INST1_HTTP =
>   (DESCRIPTION =
>     (ADDRESS_LIST =
>       (ADDRESS = (PROTOCOL = TCP)(HOST = S2-61-052-33051)(PORT = 1521))
>     )
>     (CONNECT_DATA =
>       (SERVER = SHARED)
>       (SERVICE_NAME = nitin.tcs)
>       (PRESENTATION = http://admin)
>     )
>   )
> 
> EXTPROC_CONNECTION_DATA =
>   (DESCRIPTION =
>     (ADDRESS_LIST =
>       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
>     )
>     (CONNECT_DATA =
>       (SID = PLSExtProc)
>       (PRESENTATION = RO)
>     )
>   )
> 
> NITIN =
>   (DESCRIPTION =
>     (ADDRESS_LIST =
>       (ADDRESS = (PROTOCOL = TCP)(HOST = S2-61-052-33051)(PORT = 1521))
>     )
>     (CONNECT_DATA =
>       (SERVICE_NAME = nitin.tcs)
>     )
>   )
> 
> _____________________________
> 
> Please suggest what should I do to correct this bug.
> 
> Thanks in advance
> 
> Regards
> Nitin         
> 
> 
> 

--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to