RE: about connect to Oracle8i

From: Date: Fri, 07 Jul 2000 02:55:11 +0000
Subject: RE: about connect to Oracle8i
Groups: php.db 
Request: Send a blank email to php-db+get-923@lists.php.net to get a copy of this message
Hi Steven, It appears that you are attempting to connect locally ( no sqlnet alias in yout ocilogon...) you should probably use whatever alias ( e.g orcl.somewhere ) is actually in tnsnames.ora that points to your target db incidentally... I found strange errors ( usually ora 12154 ) could occur unless LD_LIBRARY_PATH included ORACLE_HOME/lib I set this and ORACLE_HOME in apachectl to avoid having to set them in scripts... Also it is probably worth using 8.1.6 libraries instead of 8.1.5 on Linux ( 8.1.5 is full of bugs ) Cheers Mark > -----Original Message----- > From: steven [SMTP:steven@icrystal.com] > Sent: Wednesday, July 05, 2000 12:41 PM > To: php-db@lists.php.net > Subject: about connect to Oracle8i > > I have install oracle8i client and apache ,linux in my system,and php4 > is working very well. > The problem is that: I have been able to connect to remot Oracle DB > using sqlplus.But when I > used php to connect to this DB,the error message shown like below: > "Warning: _oci_open_server: ORA-12154: TNS:could not resolve service > name...." > my code is following: > <?php > putenv("ORACLE_HOME=/u01/app/oracle/product/8.1.5"); > $conn=ocilogon("username","password")or die ("couldn't connect > to > DB"); > ocilogoff($conn); > echo "Ok"; > ?> > Do i need setup path of "tnsname.ora"?how do i do? > Or is there the envirment varables else do i need set up? > Could you help me? > > Thanks, > > Steven > >

« previous php.db (#923) next »