Jump to content

oci_connect using easy connect naming method needes listener??


dilong

Recommended Posts

Hi,

I was thinking that using the easy connect naming method in oci_connect does not require a running 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 11.2.0.3.0 (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!

chuan

 

P.S.: Yes I read http://www.phpfreaks.com/forums/index.php?topic=196014.0, but it doesn't help.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.