I'm used to connecting to Oracle remotely under linux. What I did was download the "instant client" or something like that. It's the small one, and php can compile against it or the full oracle client. They're a little different. After that, if you're doing it my way, you'll need a tnsnames.ora file. Here's a short script that works in my machine:
<?php
putenv("TNS_ADMIN=/u01/app/oracle/product/orcl10gc/network/admin/");
putenv("ORACLE_HOME=/u01/app/oracle/product/orcl10gc/");
$oconn = oci_connect("reporting","PWD","DBID");
$query = "select * from schema.table order by field";
$res = oci_parse($oconn,$query);
usleep(100);
if (oci_execute($res)){
usleep(100);
print "<TABLE border \"1\">";
$first = 0;
while ($row = @oci_fetch_assoc($res)){
if (!$first){
$first = 1;
print "<TR><TH>";
print implode("</TH><TH>",array_keys($row));
print "</TH></TR>\n";
}
print "<TR><TD>";
print @implode("</TD><TD>",array_values($row));
print "</TD></TR>\n";
}
print "</TABLE>";
}
?>