For a couple of days now I've been trying to establish an Oracle connection with no luck.
My environment is:<br><br>
Win NT<br>
Apache 1.3.20<br>
PHP 4.0.6 CGI<br>
Oracle 7.3<br>
I get 2 types of errors:<br>
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><br>
Here is my code:
<
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);
>