Re: TNS could not resolve service name with php_oci8.dll on Win NT

From: Date: Wed, 06 Sep 2000 18:44:38 +0000
Subject: Re: TNS could not resolve service name with php_oci8.dll on Win NT
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-2664@lists.php.net to get a copy of this message
On 2000-09-06, Olivier Delaye stated: } I have a problem using php_oci8.dll with php4 on Win NT } } The "ocilogon" function returns the following error: } "TNS:could not resolve service name" } } The file "tnsnames.ora" is correct since the same access } is successful with SQL-Plus... } } My "tnsnames.ora" file is located in \orant\net80\admin } maybe oci8 is looking for it in another place? If you're using Apache, then you must add the following two lines into your httpd.conf file: ==== SetEnv TNS_ADMIN "D:\orant\net80\admin" SetEnv ORACLE_HOME "D:\orant" ==== *Important* Note: Both directories must be located on the w3 server itself! They can not be on remote/network drives. Also, you should put the name of the drive, [in my case D:] in there as well. Also, make sure your NT box has your Oracle home and TNS_ADMIN set in the System Enviroment [System Variables] Control Panel. You'll need to restart Apache for these changes to take effect. HTH, /vjl/

« previous php.db (#2664) next »