Hello,

I have problems connecting with PHP to Oracle.

- Operating system is Windows 95
- Apache version is 1.3.14
- The PHP version is 4.04pl1 (NuSphere 1.13.6)
- The line "extension=php_oracle.dll" is active in php.ini
- De Oracle Database version is 7.3.4.0.0
- De SQL*NET client version is 2.3.4.0.0
- Using the SQL PLUS 3.3.4.0.0 client on this machine works fine:
- The ociw32.dll file is in the path of the webserver

The test program is:

 <?php
  putenv('ORACLE_HOME=c:\orawin95');
  putenv("ORACLE_SID=WKDS");
  $conn = ora_logon("hgj@wkds", "hgj");
 ?>

The result is:

 Warning: Unable to connect to ORACLE (ORA-12154: TNS:could not resolve
 service name) in /www/data/ontwikkel/test/php/test3.php on line 4

I have lookup the ORA-12154 error and it talks about the tnsnames.ora
file, this file is located in c:\orawin95\network\admin\ and I have set
ORACLE_HOME to c:\orawin95, so it must find that file, the part
of the database in tnsnames.ora is below.

wkds.world = 
  (DESCRIPTION = 
    (ADDRESS_LIST = 
        (ADDRESS = 
          (COMMUNITY = tcp.world)
          (PROTOCOL = TCP)
          (Host = rnwux1)
          (Port = 1521)
        )
        (ADDRESS = 
          (COMMUNITY = tcp.world)
          (PROTOCOL = TCP)
          (Host = rnwux1)
          (Port = 1526)
        )
    )
    (CONNECT_DATA = (SID = WKDS)
    )
  )


Greetings, Herbert

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to