OCI is Oracle 8, on my system the ora functions don't work with Oracle 8.
Here comes an OCI query function example. You will need $dbuser, $dbpwd variables that contain your access data.
function db_query($sql)
{
global $dbuser, $dbpwd;
$conn = ocilogon($dbuser, $dbpwd);
if (!$conn)
die ("DB error");
$stmt = ociparse($conn, $sql);
ociexecute($stmt);
$zeilen = array();
$result = array();
$i=0;
while(OCIFetchInto($stmt, &$result, OCI_NUM))
{
$zeilen[$i] = $result;
$result = array();
$i++;
}
ocilogoff($conn);
return $zeilen;
}
Note that I experienced zombies being produced by the Apache Web Server in combination with PHP4 and Linux. It's Apache's fault, we tried around a bit changing versions, now it works.