note 16938 rejected from ref.oracle by zak

From: Date: Tue, 20 Nov 2001 02:32:40 +0000
Subject: note 16938 rejected from ref.oracle by zak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-21040@lists.php.net to get a copy of this message
For a couple of days now I've been trying to establish an Oracle connection with no luck. My environment is:<br> Win NT Apache 1.3.20 PHP 4.0.6 CGI Oracle 7.3 I get 2 types of errors: 1) ORA-12154: TNS:could not resolve service name<br> 2) ORA-03121: no interface driver connected<br> I get the first error when my connect statement looks like this:<br> Ora_Logon("user@db.world","passwd"); <br> The second error comes up when I use the following connect statement:<br> Ora_Logon("user","passwd");<br> I have verified my tnsnames.ora and it looks fine I got rid of the CR, as I saw in one of the posts that CR might be messing this up. My phpinfo() shows Oracle-Support as enabled. I created a direcotry called extensions in the root php directory and dropped php_oracle.dll in it, then I uncommented: extension=php_oracle.dll in my php.ini file and verified: extension_dir = "c:\php\extensions" <br> Any suggestions will be strongly appreciated. Thank you. Here is my code:<br> ===================================== <br> &lt; putenv("ORACLE_SID=db.world"); putenv("ORACLE_HOME=C:\ORANT"); putenv("TNS_ADMIN=C:\ORANT\NETWORK\ADMIN"); if(!($connection=Ora_Logon("user@db.world","passwd"))) { echo "Couldn't logon to database."; exit(); } else echo "Connected to database"; OCILogoff($connection); &gt;

« previous php.notes (#21040) next »