If I use oci8 php5 extension (compiled using oracle 8.1.7 on a Gentoo GNU/Linux distro) all works well with some like this:
$db = "(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = <IP>)(PORT = 1521))
(CONNECT_DATA= (SID = ORCL))
)";
$conn = ocilogon('user' , 'pwd' , $db);
$stmt = ociparse($conn, "select * from test.field");
ociexecute($stmt, OCI_DEFAULT);
echo $conn."----selecting\n\n";
while (ocifetch($stmt)) {
echo $conn . " [" . ociresult($stmt, "BYEBYE") . "]\n\n";
}
echo $conn . "----done\n\n";
I need to use explicit dsn... read this http://bugs.php.net/bug.php?id=13526&edit=1
But how can I format a dsn string for using with PEAR???
$dsn='oci8://user:pwd@MYORACLE';
where MYORACLE is set correctly in tnsnames.ora, doesn't work 🙁
Can I use explicit oracle db definition like in "pure" php?