I am having problems getting our new php based site to connect to an Oracle server across the internet. We are using the OCI8 extensions of PHP 4.2.2 on a Linux machine to connect to on Oracle 9i server on an NT machine. We currently connect to the same database server from the same webserver from jsp pages using jdbc, and that works just fine. The same pages connect to the Oracle server just fine from an internal machine across our VPN, but they do not work across the internet from our DMZ web server. I am pretty sure all of the drivers and paths, etc. are set up correct because we are getting sqlnet.log entries when we attempt to connect:
Fatal NI connect error 12535, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=12.10..)(PORT=1521))(CONNECT_DA
TA=(SERVICE_NAME=starteam)(CID=(PROGRAM=)(HOST=nisc)(USER=apache))))
VERSION INFORMATION:
TNS for Linux: Version 9.2.0.1.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 9.2.0.1.0 - Production
Time: 08-JUL-2004 11:02:27
Tracing to file: /disk1/oracle/product/9.2/network/trace/client_27596.trc
Tns error struct:
nr err code: 0
ns main err code: 12535
TNS-12535: TNS:operation timed out
ns secondary err code: 12560
nt main err code: 505
TNS-00505: Operation timed out
nt secondary err code: 110
Also, tnsping from the command line to the service name works just fine. It appears from the trace file listed above that it makes an initial
connection to the outside address of the database server, and then the client tries to open a transport to the internal IP of the machine, which it cannot reach. This IP is not stored anywhere on the client machine so it must be getting from the DB server when it makes its initial connection. I will post the end of the log below.
So, does anyone have any ideas what I can do to make our new php connection work like our old jsp connection?
Thanks in advance,
Leif
[08-JUL-2004 10:06:58:467] niotns: Calling address: (DESCRIPTION=(ADDRESS_LIST=(
ADDRESS=(PROTOCOL=TCP)(HOST=oms)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=startea
m)(CID=(PROGRAM=)(HOST=nisc)(USER=apache))))
[08-JUL-2004 10:06:58:468] nscall: connecting...
[08-JUL-2004 10:06:58:469] nttgetport: port resolved to 1521
[08-JUL-2004 10:06:58:470] nttbnd2addr: looking up IP addr for host: oms
[08-JUL-2004 10:06:58:471] nsopen: opening transport...
[08-JUL-2004 10:06:58:472] nttcnp: Validnode Table IN use; err 0x0
[08-JUL-2004 10:06:58:472] nttcni: trying to connect to socket 11.
[08-JUL-2004 10:06:58:538] nttcni: connected on ipaddr 207.243..
[08-JUL-2004 10:06:58:538] nttcon: set TCP_NODELAY on 11
[08-JUL-2004 10:06:58:539] nsopen: transport is open
[08-JUL-2004 10:06:58:544] nsnainit: inf->nsinfflg[0]: 0x41 inf->nsinfflg[1]: 0x
41
[08-JUL-2004 10:06:58:544] nsopen: global context check-in (to slot 0) complete
[08-JUL-2004 10:06:58:545] nscon: doing connect handshake...
[08-JUL-2004 10:06:58:545] nscon: sending NSPTCN packet
[08-JUL-2004 10:06:58:664] nscon: got NSPTRD packet
[08-JUL-2004 10:06:58:665] nscall: redirected
[08-JUL-2004 10:06:58:666] nsclose: closing transport
[08-JUL-2004 10:06:58:666] nsclose: global context check-out (from slot 0) complete
[08-JUL-2004 10:06:58:667] nscall: connecting...
[08-JUL-2004 10:06:58:667] nttgetport: port resolved to 2298
[08-JUL-2004 10:06:58:668] nttbnd2addr: using host IP address: 10.27..
[08-JUL-2004 10:06:58:668] nsopen: opening transport...
[08-JUL-2004 10:06:58:668] nttcnp: Validnode Table IN use; err 0x0
[08-JUL-2004 10:06:58:669] nttcni: trying to connect to socket 11.
[08-JUL-2004 10:10:07:660] ntt2err: soc 11 error - operation=1, ntresnt[0]=505,
ntresnt[1]=110, ntresnt[2]=0
[08-JUL-2004 10:10:07:660] nserror: nsres: id=0, op=65, ns=12535, ns2=12560; nt[
0]=505, nt[1]=110, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
[08-JUL-2004 10:10:07:661] nsopen: unable to open transport
[08-JUL-2004 10:10:07:661] nioqper: error from nscall
[08-JUL-2004 10:10:07:661] nioqper: nr err code: 0
[08-JUL-2004 10:10:07:662] nioqper: ns main err code: 12535
[08-JUL-2004 10:10:07:662] nioqper: ns (2) err code: 12560
[08-JUL-2004 10:10:07:662] nioqper: nt main err code: 505
[08-JUL-2004 10:10:07:662] nioqper: nt (2) err code: 110
[08-JUL-2004 10:10:07:663] nioqper: nt OS err code: 0
[08-JUL-2004 10:10:07:663] niqme: reporting NS-12535 error as ORA-12535
[08-JUL-2004 10:10:07:663] niomapnserror: returning error 12535
[08-JUL-2004 10:10:07:663] niotns: Couldn't connect, returning 12535
[08-JUL-2004 10:10:07:666] nigtrm: Count in the NI global area is now 1
[08-JUL-2004 10:10:07:666] nigtrm: Count in the NL global area is now 1