note 105284 modified in function.oci-connect by danbrown

From: Date: Mon, 08 Aug 2011 14:48:54 +0000
Subject: note 105284 modified in function.oci-connect by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-182330@lists.php.net to get a copy of this message
I started getting "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor" errors when I upgraded my database instance from 10.2 to 11.2. For some reason it would not resolve the oci_connect calls with the Easy Connect syntax (easy connect calls from sqlplus were fine). I was able to workaround the issue by passing a tns connect string: <?php $db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.XX.XXX)(PORT = 1521)))(CONNECT_DATA=(SID=XXXX)))"; $c1 = oci_connect("name","password",$db); ?> --was-- I started getting "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor" errors when I upgraded my database instance from 10.2 to 11.2. For some reason it would not resolve the oci_connect calls with the Easy Connect syntax (easy connect calls from sqlplus were fine). I was able to workaround the issue by passing a tns connect string as described in an earlier comment: $db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.XX.XXX)(PORT = 1521)))(CONNECT_DATA=(SID=XXXX)))"; $c1 = oci_connect("name","password",$db); http://php.net/manual/en/function.oci-connect.php

« previous php.notes (#182330) next »