Problems connecting to Oracle 8.1.5 on remote machine

From: Date: Wed, 13 Dec 2000 10:46:01 +0000
Subject: Problems connecting to Oracle 8.1.5 on remote machine
Groups: php.db 
Request: Send a blank email to php-db+get-5205@lists.php.net to get a copy of this message
Hi, I've got a machine running Solaris 2.7. On this machine I have installed Apache 1.3.14 (with mod_ssl), Oracle 8.1.6 (complete server) and PHP 4.0.3pl1. Installation went perfect and everything seems to be working. I can connect to the local Oracle-database using OCILogin. Now I need to connect to an Oracle-database which is located on an other machine. I have added a section for that database to my tnsnames.ora but when trying to connect from PHP I only get 'Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name'. I've tried calling OCILogon with a third argument specifying the database to use and I've tried without it, assuming it will default to what I have set $ORACLE_SID to prior to startup. I can connect to the database when I use sqlplus on my machine, but connection from PHP fails. I've added Oracle-environment variables to my startup-script for Apache and when I run phpinfo() I can see that they are set: LD_LIBRARY_PATH=/usr/local/lib:/opt/oracle/8.1.6/lib:/usr/local/mysql/0/lib/mysql:$LD_LIBRARY_PATH ORACLE_HOME=/opt/oracle/8.1.6 ORA_NLS33=/opt/oracle/8.1.6/ocommon/nls/admin/data ORA_NLS32=/opt/oracle/8.1.6/ocommon/nls/admin/data ORA_NLS=/opt/oracle/8.1.6/ocommon/nls/admin/data NLS_TERRITORY=AMERICA NLS_LANGUAGE=AMERICAN NLS_CHARACTERSET=WE8ISO8859P1 LANGUAGE=AMERICAN PATH=/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/bin/X11:/usr/local/bin:/opt/local/bin:/usr/ucb:/edt/pgm/bin:/edt/pgm/scriptx:/opt/oracle/8.1.6/bin ORACLE_BASE=/opt/oracle ORACLE_SID=EPDB TNS_ADMIN=/opt/oracle/8.1.6/network/admin NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 export NLS_CHARACTERSET NLS_LANGUAGE NLS_TERRITORY NLS_LANG ORA_NLS export PATH LANGUAGE TNS_ADMIN NLS_LANG ORA_NLS32 ORA_NLS33 ORACLE_HOME ORACLE_SID export LD_LIBRARY_PATH I'm not very good at Oracle-admin so I guess that's where my problem lies. I've tried to add a section to listener.ora as well but that didn't help. Suggestions? Regards, Peter

« previous php.db (#5205) next »