PHP4.22/OCI8/Netscape 3.63 tnsnames problem...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

I've having some problems with ORACLE_SID under Solaris 8/PHP
4.22/Netscape 3.63.

If I specify the ORACLE_SID, and export it within my environment before
webserver startup, php/oracle do not look up the SID within
tnsnames.ora.  I verified this with truss:

Trace output:
Fatal NI connect error 12545, connecting to:
 
(DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/data01/oracle/bin/oracle)(
ARGV0=orac
leblah)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')(DETACH
=NO))(
CONNECT_DATA=(CID=(PROGRAM=)(HOST=foo)(USER=fish))))

[---- ORACLE_SID=blah, OciLogon ( "user", "pw", "" ); -----]
# ps -funs | awk '{print $2}' | xargs truss -f -topen,access -p
10186:  access("/data/oracle/network/admin/ldap.ora", 0) Err#2 ENOENT
10186:  open("/data/oracle/rdbms/mesg/ocius.msb", O_RDONLY) = 19
10186:  open("/data/netscape/testing/test.php", O_RDONLY) = 20
10186:  open("/data/netscape/testing/connecttest.php", O_RDONLY) = 20
10186:  open64("./../", O_RDONLY|O_NDELAY)              = 20
10186:  open64("./../../", O_RDONLY|O_NDELAY)           = 20
10186:  open64("./../../../", O_RDONLY|O_NDELAY)        = 20
10186:  open64("./../../../../", O_RDONLY|O_NDELAY)     = 20
10186:  open("/etc/mnttab", O_RDONLY)                   = 21
10186:  access("/data/oracle/network/admin/ldap.ora", 0) Err#2 ENOENT
10186:  access("/data/oracle/network/admin/sqlnet.ora", 0) = 0
10186:  open("/data/oracle/network/admin/sqlnet.ora", O_RDONLY) = 20
10186:  access("/.sqlnet.ora", 0)                       Err#2 ENOENT
10186:  access("/data/oracle/network/admin/intchg.ora", 0) Err#2 ENOENT
10186:  access("/var/opt/oracle/intchg.ora", 0)         Err#2 ENOENT
10186:  access("/data/oracle/network/admin/intchg.ora", 0) Err#2 ENOENT
10186:  access("/data/oracle/network/admin/tnsnav.ora", 0) Err#2 ENOENT
10186:  access("/var/opt/oracle/tnsnav.ora", 0)         Err#2 ENOENT
10186:  access("/data/oracle/network/admin/tnsnav.ora", 0) Err#2 ENOENT
10186:  open("/data/netscape/https-testing/config/sqlnet.log",
O_WRONLY|O_APPEND|
O_CREAT, 0666) = 20
10186:  open("/data/oracle/network/mesg/tnsus.msb", O_RDONLY) = 21
10186:  open("/data/oracle/rdbms/mesg/oraus.msb", O_RDONLY) = 22
[---- ORACLE_SID=blah, OciLogon ( "user", "pw", "" ); -----]

If I specify the same SID in the db field of OciLogon it succeeds to
look up tnsnames.ora for the sid and connects properly:

[---- No ORACLE_SID, OciLogon ( "user", "pw", "blah" ); -----]
10210:  access("/data/oracle/network/admin/ldap.ora", 0) Err#2 ENOENT
10210:  open("/data/oracle/rdbms/mesg/ocius.msb", O_RDONLY) = 19
10210:  open("/data/netscape/testing/test.php", O_RDONLY) = 20
10210:  open("/data/netscape/testing/connecttest.php", O_RDONLY) = 20
10210:  open64("./../", O_RDONLY|O_NDELAY)              = 20
10210:  open64("./../../", O_RDONLY|O_NDELAY)           = 20
10210:  open64("./../../../", O_RDONLY|O_NDELAY)        = 20
10210:  open64("./../../../../", O_RDONLY|O_NDELAY)     = 20
10210:  open("/etc/mnttab", O_RDONLY)                   = 21
10210:  access("/data/oracle/network/admin/ldap.ora", 0) Err#2 ENOENT
10210:  access("/data/oracle/network/admin/sqlnet.ora", 0) = 0
10210:  open("/data/oracle/network/admin/sqlnet.ora", O_RDONLY) = 20
10210:  access("/.sqlnet.ora", 0)                       Err#2 ENOENT
10210:  access("/data/oracle/network/admin/intchg.ora", 0) Err#2 ENOENT
10210:  access("/var/data/oracle/intchg.ora", 0)         Err#2 ENOENT
10210:  access("/data/oracle/network/admin/intchg.ora", 0) Err#2 ENOENT
10210:  access("/data/oracle/network/admin/tnsnav.ora", 0) Err#2 ENOENT
10210:  access("/var/data/oracle/tnsnav.ora", 0)         Err#2 ENOENT
10210:  access("/data/oracle/network/admin/tnsnav.ora", 0) Err#2 ENOENT
10210:  access("/.tnsnames.ora", 0)                     Err#2 ENOENT
*** Why doesn't this happen with ORACLE_SID and a blank db in OciLogon??
10210:  access("/data/oracle/network/admin/tnsnames.ora", 0) = 0
10210:  open("/data/oracle/network/names/.sdns.ora", O_RDONLY) Err#2
ENOENT
10210:  open("/data/oracle/network/admin/tnsnames.ora", O_RDONLY) = 20
10210:  access("/.tnsnames.ora", 0)                     Err#2 ENOENT
10210:  access("/data/oracle/network/admin/tnsnames.ora", 0) = 0
10210:  open("/data/oracle/network/names/.sdns.ora", O_RDONLY) Err#2
ENOENT
10210:  open("/data/oracle/network/admin/tnsnames.ora", O_RDONLY) = 20
10210:  access("/data/oracle/network/admin/protocol.ora", 0) Err#2
ENOENT
10210:  access("/data/oracle/network/admin/protocol.ora", 0) Err#2
ENOENT
10210:  open("/etc/ttysrch", O_RDONLY)                  = 21
10210:  open("/proc/10210", O_RDONLY)                   = 21
10210:  open("/data/oracle/ocommon/nls/admin/data/lx1boot.nlb",
O_RDONLY) = 21
10210:  open("/etc/ttysrch", O_RDONLY)                  = 21
[---- No ORACLE_SID, OciLogon ( "user", "pw", "blah" ); -----]

Am I doing something stupid with the value in ORACLE_SID?  If I have
correctly specified ORACLE_SID then is PHP 4.22 working as designed or
is this a bug in php or oracle?

thanks in advance,

Dave.



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



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux