|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-06-12 16:30 UTC] kalowsky@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 14:00:01 2025 UTC |
Problem: Connecting to a remote Oracle Server with PHP4/ WindowsNT/Apache,extension Oracle Description: 1)Configuration: Oracle client 7.3 Apache 1.3.12 php version 4.0.3pl1 server api: cgi system: windows NT 4.0 activated extension: Oracle(installation of php_oracle.ddl good !, tested) 2)I have setup the sqlnet.ora and tnsnames.ora files to point to the location of the remote DB: MARP.WORLD = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = bca02bruqldb01)(PORT = 1521)) (CONNECT_DATA = (SID = MARP)) ) 3)With a query tool like WinSQL or MSACCESS the connection to the database works perfect!!! 4)When a try to connect in a phpscript it doesn't work anymore!! $conn=Ora_Logon("USERNAME@MARP","password"); I get the error: Oracle: Connection Failed: ORA-12154: TNS:could not resolve service name 5) I also get the following error file SQLnetin the log: *********************************************************************** Fatal OSN connect error 12154, connecting to: MARP VERSION INFORMATION: TNS for 32-bit Windows: Version 2.3.4.0.0 - Production Time: 23-OCT-00 09:47:05 Tracing not turned on. *********************************************************************** Fatal OSN connect error 12547, connecting to: (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle80)(ARGV0=oracle80ORCL)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')))(CONNECT_DATA=(SID=ORCL)(CID=(PROGRAM=php.exe)(HOST=PCINF990009115)(USER=KJC6600)))) VERSION INFORMATION: TNS for 32-bit Windows: Version 2.3.4.0.0 - Production Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 2.3.4.0.0 - Production Time: 23-OCT-00 09:47:06 Tracing not turned on. Tns error struct: nr err code: 12206 TNS-12206: TNS:received a TNS error during navigation ns main err code: 12547 TNS-12547: TNS:lost contact ns secondary err code: 12560 nt main err code: 517 TNS-00517: Lost contact nt secondary err code: 0 nt OS err code: 0 6) What is the solution ? remark: I have similar problems with ODBC !!!!! Please give in detail the steps to implement to make it work. I tried already several things. Give a clear answer !!!!!! 7)Supplementary information: I also tried to define environment variables for oracle in the httpd.conf # Apache Oracle environment variables SetEnv ORACLE_HOME "d:/orant" SetEnv TNS_ADMIN "d:/orant/network/admin" But nothing works !! When I also set the environment variable ORACLE_SID SetEnv ORACLE_SID "MARP" Then I connect with: $conn=Ora_Logon("USERNAME","password"); It don't work and I get another error: ORA-03121 no interface driver connected - function not performed explanation of Oracle for this error: Cause: This message occurs usually because the SQL*Net driver is not loaded into memory or there is a mismatch of the version of the driver. A user program linked with an obsolete library may also cause this message. Only programs provided by Oracle Corporation should use this interface. Action: If the message occurred during use of a program provided by Oracle Corporation, contact customer support. If a user program caused the message, relink the program with current versions of the Oracle libraries.