For a couple of days now I've been trying to establish an Oracle connection with
no luck. My environment is:
Win NT -Local
Apache 1.3.20 -Local
PHP 4.0.6 CGI -Local
Oracle 7.3 -Remote (Solaris 5.6)
I get 2 types of errors:
1) ORA-12154: TNS:could not resolve service name
2) ORA-03121: no interface driver connected
I get the first error when my connect statement looks like this:
Ora_Logon("user@db.world","passwd");
The second error comes up when I use the following connect statement:
Ora_Logon("user","passwd");
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"
Any suggestions will be strongly appreciated. Thank you.
Here is my code:
<br>
<
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";
Ora_Logoff($connection);
>