about connect to Oracle8i

From: Date: Wed, 05 Jul 2000 00:40:57 +0000
Subject: about connect to Oracle8i
Groups: php.db 
Request: Send a blank email to php-db+get-851@lists.php.net to get a copy of this message
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 (#851) next »