Jump to content

oci_connect using easy connect naming method needes listener??


Recommended Posts


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 (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!



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


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.