1 Reply Latest reply on Dec 23, 2011 3:08 AM by cj

    oci_connect using easy connect naming method needs listener??

      I was thinking that using the easy connect naming method in oci_connect does not require a running local tnslsnr!? Am I wrong?

      I tried:
      $db = '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = my-ora-host.example.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = my-service.example.com)))';

      // $db = '//my-ora-host.example.com:1521/my-service.example.com';

      $ora_conn = oci_connect('test', 'test', $db);

      Using both versions of the 'db' I receive the error:
      mod_fcgid: stderr: PHP Warning: oci_connect(): ORA-12541: TNS:no listener in ....

      I am using a self compiled PHP 5.3.8 using Oracles instantclient (on Linux, 32bit).
      There are NO special environment variables ( like ORACLE_HOME or TNS_ADMIN), because I was thinking that I don't need them...

      Am I wrong? Is a running tnslsnr always required? Or am I doing wrong in specifying the connection string?

      Any help is appreciated!