This discussion is archived
14 Replies Latest reply: Jan 17, 2013 4:28 AM by stee1rat RSS

oci_execute(): ORA-12541: TNS:no listener in...

985428 Newbie
Currently Being Moderated
Ok here's my problem:
i'm able to connect to the database with oci_connect, but not to execute a statement.

my code for the connection is like this:

$db= '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = THE_NAME)))';
$connection = oci_connect('user', 'password', $db);


for the oci_execute:

$query= "SELECT * FROM table";
$stmt= oci_parse ($connection, $query);
oci_execute ($stmt);


yesterday the same code was running fine for me and i don't know why.
I already checked and confirmed that the listener is running

Thanks in advance

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points