I have on my server :
Windows NT 4 SP4
Oracle 8i Enterprise Edition
Apache 1.3.12
PHP 4.0.1pl2 with php_oci8.dll
I've tried to connect via PHP with a script like this :
$db = "apache";
$c1 = ocilogon("apache","apache",$db);
, where $db= "apache" is a name created with Net8 Easy Config.
The d:\oracle\ora81\network\admin\tnsnames.ora file containes:
APACHE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.187)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = banca)
)
)
and "banca" is the Global Database name.
The error i'm getting is :
Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name
in c:\apache\htdocs\oracle.php on line 8
I added the following lines in my php script :
putenv("ORACLE_HOME=d:\oracle\ora81");
putenv("LD_LIBRARY_PATH=d:\oracle\ora81\lib");
and I get the same error.
PLEASE HELP ME ...